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--)
88 $factor = pow(self::FACTOR,$i);
89 if(($tmp = (
int) ($num / $factor))
or $found)
92 $num = $num % $factor;
99 $path_string = (implode(
'/',
$path).
'/');
101 return $path_string.$a_name.
'_'.$a_container_id;
135 if(!file_exists($this->path))
161 switch($this->storage_type)
163 case self::STORAGE_DATA:
167 case self::STORAGE_WEB:
177 if($this->path_conversion)
179 $this->path .= self::_createPathFromId($this->container_id,$this->
getPathPostfix());
197 if(!$fp = @fopen($a_absolute_path,
'w+'))
201 if(@fwrite($fp,$a_data) ===
false)
219 if(@file_exists($a_abs_name))
221 @unlink($a_abs_name);
236 if(@file_exists($a_abs_name))
252 public function delete()
268 if(@file_exists($a_from))
270 @copy($a_from,$a_to);
287 return ilUpdateUtilsMailMigration::rCopy($a_source,$a_target);
292 $this->path .= $a_appendix;
static removeTrailingPathSeparators($path)
static getWebspaceDir($mode="filesystem")
deleteDirectory($a_abs_name)
Delete directory.
static makeDirParents($a_dir)
deleteFile($a_abs_name)
Delete file.
writeToFile($a_data, $a_absolute_path)
Write data to file.
copyFile($a_from, $a_to)
Copy files.
__construct($a_storage_type, $a_path_conversion, $a_container_id)
Constructor.
getAbsolutePath()
Get absolute path of storage directory.
static _createPathFromId($a_container_id, $a_name)
Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5.
_copyDirectory($a_source, $a_target)
Copy directory and all contents.
getPathPrefix()
Get path prefix.
create()
Create directory.
Create styles array
The data for the language used.
getPathPostfix()
Get directory name.
appendToPath($a_appendix)