Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File from apptools.io should implement os.PathLike #113

Open
corranwebster opened this issue Dec 9, 2019 · 0 comments
Open

File from apptools.io should implement os.PathLike #113

corranwebster opened this issue Dec 9, 2019 · 0 comments

Comments

@corranwebster
Copy link
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant