KnpLabs / Gaufrette

PHP library that provides a filesystem abstraction layer − will be a feast for your files!
http://knplabs.github.io/Gaufrette
MIT License
2.47k stars 355 forks source link

[1.0] Delete files matching prefix #531

Open nicolasmure opened 7 years ago

nicolasmure commented 7 years ago

Currently, we can't delete folders (only files one by one), and it is a required feature ( #182 , #524 ).

Proposal

After a discussion with @NiR- , here is what came out :

There are two functions which are used to get the file list managed by the adapter :

The folder removal function should also have a prefix argument which will be the folder to delete. Also, it would be good to remove the keys function and to rename the listKeys function to keys and to keep its optional prefix parameter. The implementation should also be moved from the FileSystem to the adapters themselves.

Todo

akerouanton commented 6 years ago

To give more background: we're going to move from filesystem abstraction to object storage abstraction, thus directory concept is neither needed nor advisable.