Skip to content

Commit

Permalink
pass through glob kwargs (#844)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant committed Mar 15, 2024
1 parent 47ffcfa commit 7fc8b60
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions s3fs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,9 @@ async def _glob(self, path, **kwargs):
raise ValueError("Cannot traverse all of S3")
return await super()._glob(path, **kwargs)

async def _find(self, path, maxdepth=None, withdirs=None, detail=False, prefix=""):
async def _find(
self, path, maxdepth=None, withdirs=None, detail=False, prefix="", **kwargs
):
"""List all files below path.
Like posix ``find`` command without conditions
Expand All @@ -825,7 +827,11 @@ async def _find(self, path, maxdepth=None, withdirs=None, detail=False, prefix="
)
if maxdepth:
return await super()._find(
bucket + "/" + key, maxdepth=maxdepth, withdirs=withdirs, detail=detail
bucket + "/" + key,
maxdepth=maxdepth,
withdirs=withdirs,
detail=detail,
**kwargs,
)
# TODO: implement find from dircache, if all listings are present
# if refresh is False:
Expand All @@ -836,7 +842,7 @@ async def _find(self, path, maxdepth=None, withdirs=None, detail=False, prefix="
# elif len(out) == 0:
# return super().find(path)
# # else: we refresh anyway, having at least two missing trees
out = await self._lsdir(path, delimiter="", prefix=prefix)
out = await self._lsdir(path, delimiter="", prefix=prefix, **kwargs)
if not out and key:
try:
out = [await self._info(path)]
Expand Down

0 comments on commit 7fc8b60

Please sign in to comment.