pathlib.PurePath.joinpath()

PurePath.joinpath(*other)

Calling this method is equivalent to combining the path with each of the other arguments in turn:

1
2
3
4
5
6
7
8
>>> 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')
doc_python
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.