PyDocs

Nav

File and Directory Access

PurePath.is_relative_to

pathlib

method of PurePath · Added in 3.9 (source) Deprecated 3.12
  • PurePath.is_relative_to(other)
Deprecated since 3.12, removed in 3.14. Passing additional arguments is deprecated; if supplied, they are joined with other.
Return True if the path is relative to another path or False.
1 Example
>>> p = PurePath('/etc/passwd')
>>> p.is_relative_to('/etc')
True
>>> p.is_relative_to('/usr')
False
from the Python docs
See Also
No see-alsos for pathlib/PurePath.is_relative_to
0 Notes
No notes for PurePath.is_relative_to