57    public function __construct($a_storage_type, $a_path_conversion, $a_container_id)
 
   59        $this->storage_type = $a_storage_type;
 
   60        $this->path_conversion = $a_path_conversion;
 
   61        $this->container_id = $a_container_id;
 
   85        $num = $a_container_id;
 
   86        for (
$i = self::MAX_EXPONENT; 
$i > 0;
$i--) {
 
   87            $factor = pow(self::FACTOR, 
$i);
 
   88            if (($tmp = (
int) ($num / $factor)) or $found) {
 
   90                $num = $num % $factor;
 
   96            $path_string = (implode(
'/', 
$path) . 
'/');
 
   98        return $path_string . $a_name . 
'_' . $a_container_id;
 
  132        if (!file_exists($this->path)) {
 
  157        switch ($this->storage_type) {
 
  172        if ($this->path_conversion) {
 
  189        if (!$fp = @fopen($a_absolute_path, 
'w+')) {
 
  192        if (@fwrite($fp, $a_data) === 
false) {
 
  209        if (@file_exists($a_abs_name)) {
 
  210            @unlink($a_abs_name);
 
  225        if (@file_exists($a_abs_name)) {
 
  240    public function delete()
 
  256        if (@file_exists($a_from)) {
 
  257            @copy($a_from, $a_to);
 
  274        return ilUpdateUtilsMailMigration::rCopy($a_source, $a_target);
 
  279        $this->path .= $a_appendix;
 
An exception for terminatinating execution or to throw for unit testing.
static _createPathFromId($a_container_id, $a_name)
Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5.
deleteFile($a_abs_name)
Delete file.
writeToFile($a_data, $a_absolute_path)
Write data to file.
getPathPostfix()
Get directory name.
create()
Create directory.
copyFile($a_from, $a_to)
Copy files.
getPathPrefix()
Get path prefix.
_copyDirectory($a_source, $a_target)
Copy directory and all contents.
deleteDirectory($a_abs_name)
Delete directory.
getAbsolutePath()
Get absolute path of storage directory.
__construct($a_storage_type, $a_path_conversion, $a_container_id)
Constructor.
appendToPath($a_appendix)
static getWebspaceDir($mode="filesystem")
static removeTrailingPathSeparators($path)
static makeDirParents($a_dir)