PurePath.drive
A string representing the drive letter or name, if any:
1 2 3 4 5 6 | >>> PureWindowsPath( 'c:/Program Files/' ).drive 'c:' >>> PureWindowsPath( '/Program Files/' ).drive '' >>> PurePosixPath( '/etc' ).drive '' |
UNC shares are also considered drives:
1 2 | >>> PureWindowsPath( '//host/share/foo.txt' ).drive '\\\\host\\share' |
Please login to continue.