adlfs
adlfs copied to clipboard
sync AzureBlobFileSystem.glob should pass **kwargs to async _glob
I want to pass detail=True to AzureBlobFileSystem.glob, but this is currently not possible. I think that simply passing **kwargs to the sync method below should suffice.
def glob(self, path, **kwargs):
return sync(self.loop, self._glob, path, **kwargs)
The current code:
https://github.com/fsspec/adlfs/blob/fbe43c601e7b162b7a2bf93f7f8b699c747b70e6/adlfs/spec.py#L670
could be easily fixed, not? I must add a patch every time I use glob(), with parameter detail=True... very annoying...
Here the patch:
from adlfs import AzureBlobFileSystem
def _patched_glob(self, path, **kwargs):
from fsspec.asyn import sync
return sync(self.loop, self._glob, path, **kwargs)
AzureBlobFileSystem.glob = _patched_glob