s3fs icon indicating copy to clipboard operation
s3fs copied to clipboard

s3fs Python API find function with pattern ?

Open Snolte1001 opened this issue 4 years ago • 1 comments

Hello, is it possible with Python s3fs and find to list only directories that match a certain pattern ? I have tried the following, but for no result bucket="logger" test=r"^[0-9a-fA-F]{8}" print(fs.find(f"{bucket}/{test}"))

Snolte1001 avatar Aug 28 '21 18:08 Snolte1001

Sorry for the late reply. You can either use find() and apply your own filtering, or your can use fs.glob(), which uses glob-style "*" characters, and is not as featured as general regex.

martindurant avatar Sep 24 '21 19:09 martindurant