17 public static function rm($dirname)
19 if (is_array($dirname)) {
20 $dirname = $dirname[1];
23 if (!@file_exists($dirname)) {
28 if (@
is_file($dirname) || @is_link($dirname)) {
34 while ($entry = array_pop($stack)) {
36 if (@is_link($entry)) {
48 $dh = opendir($entry);
49 while (
false !== ($child = readdir($dh))) {
51 if ($child ===
'.' || $child ===
'..') {
55 $child = $entry .
'/' . $child;
56 if (
is_dir($child) && !is_link($child)) {
78 $exists = file_exists(
$path);
83 throw new \Exception(
"'{$path}' already exists, should be a dir, not a file!");
87 throw new \Exception(
"Can't create dir: '{$path}'");
101 $exists = file_exists(
$source);
103 throw new \Exception(
'No file exists: ' . $exists);
static copyFileStrict($source, $dest)
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
mkdir($pathname, $mode=0777, $recursive=false, $context=null)
static mkdirStrict($path, $recursive=true, $mode=0777)