today when i'm debugging, i see it's extremely painful that can't recursive del files or at least del multiple files. (i need to clean up DEBUG dir.)
giving the fact that it COULD be dangerous to implement recursive del in simple way (for example when too much sub-levels in stack and it crashed at the half way by out of ram during del, which could leading damage filesystem),
i decided to implement this clean feature, which will do:
select a dir to clean: del all sub-files exclude sub-dirs
sel a file to clean: del all files in same dir, exclude dirs and sub-dirs
forbid other situation like select . or .. or empty dir etc.
tested with up to 200 files and it done very quick
CONSIDER THIS AS AN WORK AROUND, AND WHEN SOMEONE MADE BETTER IMPLEMENTATION, WE CAN REMOVE THIS FEAT.
today when i'm debugging, i see it's extremely painful that can't recursive del files or at least del multiple files. (i need to clean up DEBUG dir.)
giving the fact that it COULD be dangerous to implement recursive del in simple way (for example when too much sub-levels in stack and it crashed at the half way by out of ram during del, which could leading damage filesystem),
i decided to implement this clean feature, which will do:
.
or..
orempty dir
etc.tested with up to 200 files and it done very quick
CONSIDER THIS AS AN WORK AROUND, AND WHEN SOMEONE MADE BETTER IMPLEMENTATION, WE CAN REMOVE THIS FEAT.