Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0] Delete files matching prefix #531

Open
13 tasks
nicolasmure opened this issue Sep 21, 2017 · 1 comment
Open
13 tasks

[1.0] Delete files matching prefix #531

nicolasmure opened this issue Sep 21, 2017 · 1 comment
Assignees
Milestone

Comments

@nicolasmure
Copy link
Contributor

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 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.

Todo

  • Filesystem
  • Adapter (interface)
  • AwsS3
  • AzureBlobStorage
  • DoctrineDbal
  • Flysystem
  • Ftp
  • GridFs
  • Local (started by Fix directory deletion #526 )
  • OpenCloud
  • PhpseclibSftp
  • SafeLocal
  • Zip
@nicolasmure nicolasmure added this to the v1.0 milestone Sep 21, 2017
@akerouanton akerouanton changed the title [1.0] Be able to delete folders [1.0] Delete files matching prefix Feb 8, 2018
@akerouanton
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants