第十节 驱动器属性

tech2022-07-07  203

驱动器属性

驱动器通常值得是我们所说的盘;

需要使用到的API函数包含一下几个:

win32api.GetVolumeInformation tuple = GetVolumeInformation(path) Returns information about a file system and colume whose root directory is specified. Parameters path : string The root path of the volume on which information is being requested. Return Value The return is a tuple of: string - Volume Name long - Volume serial number. long - Maximum Component Length of a file name. long - Sys Flags - other flags specific to the file system. See the api for details. string - File System Name win32file.GetDriveType int = GetDriveType(rootPathName) Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. Parameters rootPathName : string Return Value The result is one of the DRIVE_* constants.
最新回复(0)