Definition at line 8 of file Dirs.php.
◆ copyFileStrict()
static copyFileStrict |
( |
|
$source, |
|
|
|
$dest |
|
) |
| |
|
static |
- Parameters
-
string | $source | |
string | $dest | |
- Returns
- void
- Exceptions
-
Definition at line 99 of file Dirs.php.
101 $exists = file_exists(
$source);
103 throw new \Exception(
'No file exists: ' . $exists);
◆ mkdirStrict()
static mkdirStrict |
( |
|
$path, |
|
|
|
$recursive = true , |
|
|
|
$mode = 0777 |
|
) |
| |
|
static |
Attempts to create the directory
- Parameters
-
string | $path | |
bool | $recursive | |
int | $mode | |
- Returns
- true
- Exceptions
-
Definition at line 76 of file Dirs.php.
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}'");
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
mkdir($pathname, $mode=0777, $recursive=false, $context=null)
◆ rm()
- Parameters
-
- Returns
- bool @SuppressWarnings(PHPMD.CyclomaticComplexity) @SuppressWarnings(PHPMD.NPathComplexity) @SuppressWarnings(PHPMD.ShortMethodName)
Definition at line 17 of file Dirs.php.
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)) {
The documentation for this class was generated from the following file:
- vendor/magento/framework/System/Dirs.php