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
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).
The text was updated successfully, but these errors were encountered:
If we were to add a
__fspath__
method and register the class withos.PathLike
(where available) it would mean thatFile
objects could be used in a similar way topathlib.Path
objects throughout Python.As a secondary consideration, using a
pathlib
path object instead of a string as the source of truth for theFile
class would simplify a lot of the logic; it would probably make sense to also duplicate thepathlib.Path
API (alongside the current API).The text was updated successfully, but these errors were encountered: