enthought / enthought/apptools
File from apptools.io should implement os.PathLike
Open
- Dominant language
- Python
- Stars
- 38
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
If we were to add a `__fspath__` method and register the class with `os.PathLike` (where available) it would mean that `File` objects could be used in a similar way to `pathlib.Path` objects throughout Python.
As a secondary consideration, using a `pathlib` path object instead of a string as the source of truth for the `File` class would simplify a lot of the logic; it would probably make sense to also duplicate the `pathlib.Path` API (alongside the current API).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.