Static Public Member Functions |
static | rmdirr ($path) |
Detailed Description
Created by JetBrains PhpStorm. User: andrew Date: 5/4/12 Time: 5:29 PM To change this template use File | Settings | File Templates.
Definition at line 9 of file FileHelper.php.
Member Function Documentation
static FileHelper::rmdirr |
( |
|
$path | ) |
|
|
static |
Removes directory recursively
- Parameters
-
string | $path | Path to the directory. |
- Returns
- bool true on success or false on failure.
Definition at line 20 of file FileHelper.php.
Referenced by ZipHelper\extract().
{
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST
);
foreach ($iterator as $file) {
if ($file->isDir()) {
} else {
unlink($file->getPathname());
}
}
return rmdir($path);
}
The documentation for this class was generated from the following file: