function ctools_stylizer_recursive_delete
Recursively delete all files and folders in the specified filepath, then delete the containing folder.
Note that this only deletes visible files with write permission.
Parameters
string $path: A filepath relative to file_directory_path.
1 call to ctools_stylizer_recursive_delete()
- ctools_stylizer_cleanup_style in includes/
stylizer.inc - Clean up no longer used files.
File
-
includes/
stylizer.inc, line 170
Code
function ctools_stylizer_recursive_delete($path) {
if (empty($path)) {
return;
}
$listing = $path . '/*';
foreach (glob($listing) as $file) {
if (is_file($file) === TRUE) {
@unlink($file);
}
elseif (is_dir($file) === TRUE) {
ctools_stylizer_recursive_delete($file);
}
}
@rmdir($path);
}