PyDocs

Nav

File and Directory Access

PurePath.anchor

pathlib

attribute of PurePath (source)
The concatenation of the drive and root, or ''.
1 Example
>>> PureWindowsPath('c:/Program Files/').anchor
'c:\\'
>>> PureWindowsPath('c:Program Files/').anchor
'c:'
>>> PurePosixPath('/etc').anchor
'/'
>>> PureWindowsPath('//host/share').anchor
'\\\\host\\share\\'
from the Python docs
See Also
No see-alsos for pathlib/PurePath.anchor
0 Notes
No notes for PurePath.anchor