Closed Tobias-B-Besemer closed 5 years ago
Seems you switched already one day to "Version 2.0"... https://github.com/bleachbit/bleachbit/commit/ac6a20a3f779ce4fa92fc100bc6553a4daf4e734
Linux allows a filename to be be a ?
or *
symbol, so autodetect is not reliable.
You wrote
and I also think that no one will easily get it that you e.g. have to use search="file", to remove an (empty?) folder...
Originally there was no plan to support deleting an empty folder (except when deleting them recursively---but not deleting the parent), and search="file"
was originally intended to delete a literal filename. It's more as a quirk that it happens to delete folders too.
You wrote
At least two wild-cards should work in every search=[...]!
With search="glob"
you can have two, or ten, or even more wildcards.
Linux allows a filename to be be a
?
or*
symbol, so autodetect is not reliable.
OK.
You wrote
and I also think that no one will easily get it that you e.g. have to use search="file", to remove an (empty?) folder...
Originally there was no plan to support deleting an empty folder (except when deleting them recursively---but not deleting the parent), and
search="file"
was originally intended to delete a literal filename. It's more as a quirk that it happens to delete folders too.
I was just thinking I need "glob" for it - this was the reason why I used it...
You wrote
At least two wild-cards should work in every search=[...]!
With
search="glob"
you can have two, or ten, or even more wildcards.
OK, but why is then the FF62 Storage Cleaner not working? Glob doesn't go recursive, right?
How should "search=folder" in future work?
I added a new search="walk.top"
which deletes all files and directories under the path plus the top directory itself. It is equivalent to search=walk.all followed by search=file
Already implemented ??? :-)
I add this to the docu...
But I think it's better to not change the cleaners by now, 'cause I have suggested a cleaner package for WinXP users with BBv2.2 and they won't have it... So last cleaner package for XP with BBv3.0 (?) and then use it and drop support for WinXP users completely ???
Added! ^^
Andrew,
I think you should re-do the search-attribute (at least for
command="delete"
) and remove (or declare as depreciated)search="glob"
. I working now since weeks on cleaners, think with my 30+ years knowledge I'm a good IT Professional, but I still don't get the glob-thing! Therefor I'm pretty sure most others interested in writing cleaners will also not get it! You just can't expect that the people understand Python (or read the documentation) and know about Unix-Commands/-Connections! Also: It seems that (at least in your implementation) are to many special cases... (See e.g.: https://github.com/bleachbit/bleachbit/issues/447) ...and I also think that no one will easily get it that you e.g. have to usesearch="file"
, to remove an (empty?) folder... ...I know you said you will bringsearch="folder"
, but I thinksearch="glob"
should be removed anyway! BleachBit should internal, depending on"path="
know whensearch="glob"
is necessary and when not!To remove
search="glob"
I see two possible options:<cleaner version="2.0" id="[...]">
!command="delete" search="[...]"
-cases I would understand/can imagine are (so far):search="file"
to remove with e.g. "", "?", or "[...]" (also in thepath
) a single file (or a file group with e.g. ".tmp", but don't go into sub-folders)!search="folder"
to remove with e.g. "", "?", or "[...]" (also in thepath
) a single folder (or a folder group with e.g. "temp", but don't go into sub-folders)! It shouldn't matter if the folder is empty or not!search="walk.files"
to remove with e.g. "", "?", or "[...]" (also in thepath
) a single file (or a file group with e.g. ".tmp" and "walk" through all sub-folders to find more files that match!search="walk.folders"
to remove with e.g. "", "?", or "[...]" (also in thepath
) a single folder (or a folder group with e.g. "temp" and "walk" through all sub-folders to find more files that match! It shouldn't matter if the folder is empty or not!At least two wild-cards should work in every
search=[...]
!E.g.
search="folder"
should work in all those writing versions:search="folder" path="$$profile$$\temp
<- Removes the foldersearch="folder" path="$$profile$$\temp\
<- Removes the foldersearch="folder" path="$$profile$$\temp\*
<- Removes the content of the folder (sub-folders)Please let me know if I have something missed!
Greets, Tobias.