Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
replace all rmdir by a recursive variant
Signed-off-by: CaCO3 <[email protected]>
  • Loading branch information
caco3 authored and CaCO3 committed Oct 26, 2023
commit ebf798976719a1eec0d8267c68e5205595b93ed2
18 changes: 18 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ public function accept(): bool {
}


function rrmdir($src) {
$dir = opendir($src);
while(false !== ( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
$full = $src . '/' . $file;
if ( is_dir($full) ) {
rrmdir($full);
}
else {
unlink($full);
}
}
}
closedir($dir);
rmdir($src);
}


class Updater {
private string $baseDir;
private array $configValues = [];
Expand Down