win32file.GetVolumePathName

PyUnicode = GetVolumePathName(FileName, BufferLength )

Returns volume mount point for a path

Parameters

FileName : PyUnicode

File/dir for which to return volume mount point

BufferLength=0 : int

Optional parm to allocate extra space for returned string

Comments

Api gives no indication of how much memory is needed, so function assumes returned path will not be longer that length of input path + 1. Use GetFullPathName first for relative paths, or GetLongPathName for 8.3 paths. Optional second parm can also be used to override the buffer size for returned path

Accepts keyword args.