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)
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;