function filedepot_delTree in filedepot 7
Same name and namespace in other branches
- 6 lib-common.php \filedepot_delTree()
1 call to filedepot_delTree()
- filedepot_uninstall in ./
filedepot.install - Implementation of hook_uninstall().
File
- ./
lib-common.php, line 556 - lib-common.php Common library of functions for the applications
Code
function filedepot_delTree($dir) {
$files = glob($dir . '*', GLOB_MARK);
foreach ($files as $file) {
if (drupal_substr($file, -1) == '/') {
filedepot_delTree($file);
}
else {
@unlink($file);
}
}
if (is_dir($dir)) {
@rmdir($dir);
}
}