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
On macOS 12.6.6. Basically, it's marking anything with a leading '/' as invalid.
$ ipython
Python 3.11.3 (main, Apr 7 2023, 19:29:16) [Clang 14.0.0 (clang-1400.0.29.202)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.13.2 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import pathvalidate as pv
In [2]: pv.is_valid_filepath('/Users/ken/duptemp/foo')
Out[2]: False
In [3]: pv.is_valid_filepath('~/duptemp/foo')
Out[3]: True
In [4]: pv.is_valid_filepath('bar/zot')
Out[4]: True
In [5]: pv.is_valid_filepath('/bar/zot')
Out[5]: False
The text was updated successfully, but these errors were encountered:
That is because platform argument defaults to "universal". universal means that check if the file path is usable on any OS.
File paths starting with / is invalid for Windows.
The return value will be True if you set platform keyword argument value for any of "auto", "POSIX", "macOS".
On macOS 12.6.6. Basically, it's marking anything with a leading '/' as invalid.
The text was updated successfully, but these errors were encountered: