PyDocs

Nav

File and Directory Access

PurePath.joinpath

pathlib

method of PurePath (source)
  • PurePath.joinpath(*pathsegments)
Combine this path with one or several arguments, and return a
new path representing either a subpath (if all arguments are relative
paths) or a totally different path (if one of the arguments is
anchored).
1 Example
>>> PurePosixPath('/etc').joinpath('passwd')
PurePosixPath('/etc/passwd')
>>> PurePosixPath('/etc').joinpath(PurePosixPath('passwd'))
PurePosixPath('/etc/passwd')
>>> PurePosixPath('/etc').joinpath('init.d', 'apache2')
PurePosixPath('/etc/init.d/apache2')
>>> PureWindowsPath('c:').joinpath('/Program Files')
PureWindowsPath('c:/Program Files')
from the Python docs
See Also
No see-alsos for pathlib/PurePath.joinpath
0 Notes
No notes for PurePath.joinpath