forked from exasol/bucketfs-utils-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
featureProduct featureProduct feature
Description
For listing files in the BucketFS or one of its folders, BFS provides method PathLike.iterdir().
When creating a list of all the filenames, iterdir() will be called one or multiple times:
names = [f.name for f in bfs_location.iterdir()]If the specified BucketFS location is empty, BFSPY raises a FileNotFoundError:
https://github.com/exasol/bucketfs-python/blob/main/exasol/bucketfs/_path.py#L450
The current ticket therefore proposes to
- either change the existing method in order to return an empty iterator
- or raise a more specific error and add a convenience method catching this error and returning an empty iterator
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureProduct featureProduct feature