You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are plenty of small utility functions that could be applied from a URI without having to instantiate a filespec object. It makes life much easier when you want to deal with different types of filesystem transparently.
Here are two examples:
defis_valid_file(path):
"""Check whether a file is a valid path"""mapper=fsspec.get_mapper(path)
returnmapper.fs.isfile(path)
defis_local_path(path):
"""Check whether a path point to a local filesystem."""mapper=fsspec.get_mapper(path)
returnmapper.fs.protocol=="file"
I guess the idea is similar to what fsspec.open already provides.
The text was updated successfully, but these errors were encountered:
There are plenty of small utility functions that could be applied from a URI without having to instantiate a filespec object. It makes life much easier when you want to deal with different types of filesystem transparently.
Here are two examples:
I guess the idea is similar to what
fsspec.open
already provides.The text was updated successfully, but these errors were encountered: