private function FMDiskFileSystem::rmDirRecursive in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7
1 call to FMDiskFileSystem::rmDirRecursive()
- FMDiskFileSystem::deleteDir in vendor/
edsdk/ flmngr-server-php/ src/ fs/ FMDiskFileSystem.php
File
- vendor/
edsdk/ flmngr-server-php/ src/ fs/ FMDiskFileSystem.php, line 109
Class
Namespace
EdSDK\FlmngrServer\fsCode
private function rmDirRecursive($dir) {
if (!file_exists($dir)) {
return TRUE;
}
if (!is_dir($dir)) {
return unlink($dir);
}
foreach (scandir($dir) as $item) {
if ($item == '.' || $item == '..') {
continue;
}
if (!$this
->rmDirRecursive($dir . DIRECTORY_SEPARATOR . $item)) {
return FALSE;
}
}
return rmdir($dir);
}