module Windows::Volume
Constants
- DRIVE_CDROM
- DRIVE_FIXED
- DRIVE_NO_ROOT_DIR
- DRIVE_RAMDISK
- DRIVE_REMOTE
- DRIVE_REMOVABLE
- DRIVE_UNKNOWN
Private Instance Methods
get_volume_type(vol = nil)
click to toggle source
Returns the volume type for vol
or the volume of the current process if no volume is specified.
Returns nil if the function fails for any reason.
# File lib/windows/volume.rb, line 55 def get_volume_type(vol = nil) buf = 0.chr * 256 bool = GetVolumeInformation(vol, nil, nil, nil, nil, nil, buf, buf.size) bool ? buf.strip : nil end