pathlib — Object-oriented filesystem paths — Python 3.14.2 documentation#pathlib.PurePath.name
PurePath.nameA string representing the final path component, excluding the drive and root, if any:
>>> PurePosixPath('my/library/setup.py').name 'setup.py'UNC drive names are not considered:
>>> PureWindowsPath('//some/share/setup.py').name 'setup.py' >>> PureWindowsPath('//some/share').name ''
Printed 2026-06-28.
(echo:: @ ᯤ)