fsspec / universal_pathlib

pathlib api extended to use fsspec backends
MIT License
251 stars 44 forks source link

Add default implementations for is_symlink etc. #51

Closed normanrz closed 2 years ago

normanrz commented 2 years ago

Several pathlib.Path methods are marked as not implemented, including is_symlink. See https://github.com/fsspec/universal_pathlib/blob/main/upath/core.py#L112-L117 Calling these methods leads to a NotImplementedError. However, in most cases (especially for object storage that don't support symlinks) the expected behavior for these is_* methods would be to return False.

I was wondering, if it would be possible to add default implementations for them that return False in the UPath class. Some subclasses could even choose to implement specific logic. Again, happy to help with a PR!