| @@ 40-42 (lines=3) @@ | ||
| 37 | parent::__construct($config); |
|
| 38 | ||
| 39 | $path = !empty($config['path']) ? $config['path'] : sys_get_temp_dir() . '/cache'; |
|
| 40 | if (!@mkdir($path, 0600) && !is_dir($path)) { |
|
| 41 | throw new Exception('Can`not create/check access to directory: ' . $path); |
|
| 42 | } |
|
| 43 | $this->driver = $path; |
|
| 44 | } |
|
| 45 | ||
| @@ 95-97 (lines=3) @@ | ||
| 92 | public static function recurseCopy($src, $dst) |
|
| 93 | { |
|
| 94 | $dir = opendir($src); |
|
| 95 | if (!@mkdir($dst, 0777) && !is_dir($dst)) { |
|
| 96 | throw new Exception('Copy dir error, access denied for path: ' . $dst); |
|
| 97 | } |
|
| 98 | ||
| 99 | while (false !== ($file = readdir($dir))) { |
|
| 100 | if (($file !== '.') && ($file !== '..')) { |
|
| @@ 127-129 (lines=3) @@ | ||
| 124 | */ |
|
| 125 | public static function recurseCopyIfEdited($src = '', $dst = '', array $excludes = ['php']) |
|
| 126 | { |
|
| 127 | if (!@mkdir($dst, 0777) && !is_dir($dst)) { |
|
| 128 | throw new Exception('Copy dir error, access denied for path: ' . $dst); |
|
| 129 | } |
|
| 130 | ||
| 131 | $dir = opendir($src); |
|
| 132 | if (!$dir) { |
|