listKeys (only for the ListKeysAware adapters)
The listKeys function can have a $prefix argument who will return only the files having this prefix in their path.
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.
To give more background: we're going to move from filesystem abstraction to object storage abstraction, thus directory concept is neither needed nor advisable.
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 :
keys
listKeys
(only for theListKeysAware
adapters) ThelistKeys
function can have a$prefix
argument who will return only the files having this prefix in their path.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 thelistKeys
function tokeys
and to keep its optional prefix parameter. The implementation should also be moved from theFileSystem
to the adapters themselves.Todo