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

filtering by prefix is missing #64

Closed
cortesimone opened this issue Jan 29, 2021 · 2 comments
Closed

filtering by prefix is missing #64

cortesimone opened this issue Jan 29, 2021 · 2 comments

Comments

@cortesimone
Copy link

Is there a way to use the $client->listFiles function filtering by file prefix? I have a bucket with 200k files and I would need to retrieve info only on those belonging to a given directory.

Thanks, S.

@mlambley
Copy link
Member

mlambley commented Feb 5, 2021

Hi @cortesimone I can see that prefix is implemented in listFiles, eg.

$client->listFiles([
    'Prefix' => $prefix
]);

I also just checked the docs and confirmed that we're implementing all of the listFiles features, so please let me know if you have any issues using the prefix parameter.

@cortesimone
Copy link
Author

Thanks,
it worked

$fileList = $client->listFiles([
    'BucketId' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'Prefix' => 'files/b1880106'
]);

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

No branches or pull requests

2 participants