32 $path = preg_replace(
"/[\/\\\]+$/",
"",
$path);
40 if ($mode ==
"filesystem")
42 return "./".ILIAS_WEB_DIR.
"/".$ilias->client_id;
48 return "../".ILIAS_WEB_DIR.
"/".$ilias->client_id;
52 return "./".ILIAS_WEB_DIR.
"/".$ilias->client_id;
61 return CLIENT_DATA_DIR;
66 $a_dir = trim($a_dir);
69 if (substr($a_dir,-1) ==
"/")
71 $a_dir = substr($a_dir,0,-1);
75 if (!(
$path = substr($a_dir,0, strrpos($a_dir,
"/") - strlen($a_dir))))
82 return @mkdir($a_dir,fileperms(
$path));
87 $dirs =
array($a_dir);
88 $a_dir = dirname($a_dir);
90 while($last_dirname != $a_dir)
92 array_unshift($dirs, $a_dir);
93 $last_dirname = $a_dir;
94 $a_dir = dirname($a_dir);
98 $reverse_paths = array_reverse($dirs, TRUE);
100 foreach ($reverse_paths as $key => $value)
102 if ($found_index == -1)
112 foreach ($dirs as $dirindex => $dir)
115 if ($dirindex >= $found_index)
117 if (! file_exists($dir))
119 if (strcmp(substr($dir,strlen($dir)-1,1),
"/") == 0)
123 $dir = substr($dir,0,strlen($dir)-1);
125 if (! mkdir($dir, $umask))
131 elseif (! is_dir($dir))
139 $umask = fileperms($dir);
148 if (!is_dir($a_dir) || is_int(strpos($a_dir,
"..")))
153 $current_dir = opendir($a_dir);
162 while($entryname = readdir($current_dir))
169 if(is_dir($a_dir.
"/".$file)
and ($file !=
"." and $file!=
".."))
171 self::delDir(${a_dir}.
"/".${
file});
173 elseif ($file !=
"." and $file !=
"..")
175 unlink(${a_dir}.
"/".${
file});
179 closedir($current_dir);
185 $current_dir = opendir($a_dir);
189 while($entry = readdir($current_dir))
191 if(is_dir($a_dir.
"/".$entry))
193 $dirs[$entry] =
array(
"type" =>
"dir",
"entry" => $entry);
197 if ($entry !=
"." && $entry !=
"..")
199 $size = filesize($a_dir.
"/".$entry);
200 $files[$entry] =
array(
"type" =>
"file",
"entry" => $entry,
208 return array_merge($dirs,
$files);
213 $temp_path = self::getDataDir() .
"/temp";
214 if (!is_dir($temp_path))
216 self::makeDir($temp_path);
218 $temp_name = tempnam($temp_path,
"tmp");
224 $temp_name = str_replace(
"\\",
"/", $temp_name);
static rename($source, $target)
static removeTrailingPathSeparators($path)
static getWebspaceDir($mode="filesystem")
static makeDirParents($a_dir)
Reload workbook from saved file
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'