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
{{ message }}
Repository navigation
Resource should implement standard pathlib-like interface #562
Implement the / operator as an alias to get_child()
Implement Folder.iterdir()
Folder.get_children() should be rewritten to call return list(self.iterdir())
Resource should inherit PurePath (rather questionable, Resource is not necessarily a Path on the filesystem, it may represent a file in a zipfile module)
The purpose here is not to make Resource usable in contexts where Path is expected, but rather simply just to standardize the vocabularies of path operations.
There is no plan to make Resource implement the entire pathlib interface; most of it doesn't make sense for rope's purpose and would only make using Resource class unnecessarily confusing (e.g. is_block_device() would never make sense for rope). If you need a real pathlib object, then access the Resource.pathlib property or convert the pathlib.Path(resource) which would use __fspath__ interface.
Activity