by makecheck · 8y ago · 0 comments
At best, it is redundant with a recursive search feature that chooses “delete” as the operation. And if you want “do something else then delete”, you can no longer call a recursive-delete command anyway so why not just learn how to enumerate files first and give your system a fighting chance to audit first?
Disk cleanup code should always create lists of known target files, attempt to delete only that list of files, then do the platform equivalent of “rmdir” at the end to attempt to remove the directory. If that fails, congratulations: your ass was saved by not deleting something you didn’t know was there.
No comments yet.