Module: Windows::Volume
- Defined in:
- lib/windows/volume.rb
Constant Summary collapse
- DRIVE_UNKNOWN =
0
- DRIVE_NO_ROOT_DIR =
1
- DRIVE_REMOVABLE =
2
- DRIVE_FIXED =
3
- DRIVE_REMOTE =
4
- DRIVE_CDROM =
5
- DRIVE_RAMDISK =
6
- FindFirstVolume =
Win32API.new('kernel32', 'FindFirstVolume', 'PL', 'L')
- FindFirstVolumeMountPoint =
Win32API.new('kernel32', 'FindFirstVolumeMountPoint', 'PPL', 'L')
- FindNextVolume =
Win32API.new('kernel32', 'FindNextVolume', 'LPL', 'I')
- FindNextVolumeMountPoint =
Win32API.new('kernel32', 'FindNextVolumeMountPoint', 'LPL', 'I')
- FindVolumeClose =
Win32API.new('kernel32', 'FindVolumeClose', 'L', 'I')
- FindVolumeMountPointClose =
Win32API.new('kernel32', 'FindVolumeMountPointClose', 'L', 'I')
- GetDriveType =
Win32API.new('kernel32', 'GetDriveType', 'P', 'I')
- GetLogicalDrives =
Win32API.new('kernel32', 'GetLogicalDrives', 'V', 'L')
- GetLogicalDriveStrings =
Win32API.new('kernel32', 'GetLogicalDriveStrings', 'LP', 'L')
- GetVolumeInformation =
Win32API.new('kernel32', 'GetVolumeInformation', 'PPLPPPPL', 'I')
- GetVolumeNameForVolumeMountPoint =
Win32API.new('kernel32', 'GetVolumeNameForVolumeMountPoint', 'PPL', 'I')
- GetVolumePathName =
Win32API.new('kernel32', 'GetVolumePathName', 'PPL', 'I')
- SetVolumeLabel =
Win32API.new('kernel32', 'SetVolumeLabel', 'PP', 'I')
- SetVolumeMountPoint =
Win32API.new('kernel32', 'SetVolumeMountPoint', 'PP', 'I')
Instance Method Summary collapse
- #FindFirstVolume(name, length = name.size) ⇒ Object
- #FindFirstVolumeMountPoint(name, volume, length = volume.size) ⇒ Object
- #FindNextVolume(handle, name, length = name.size) ⇒ Object
- #FindNextVolumeMountPoint(handle, name, length = name.size) ⇒ Object
- #FindVolumeClose(handle) ⇒ Object
- #FindVolumeMountPointClose(handle) ⇒ Object
- #GetDriveType(path) ⇒ Object
- #GetLogicalDrives ⇒ Object
- #GetLogicalDriveStrings(length, buffer) ⇒ Object
- #GetVolumeInformation(path, v_buf, v_size, serial, length, flags, fs_buf, fs_size) ⇒ Object
- #GetVolumeNameForVolumeMountPoint(mount, name, length = name.size) ⇒ Object
- #GetVolumePathName(file, name, length = name.size) ⇒ Object
- #SetVolumeLabel(label, volume) ⇒ Object
- #SetVolumeMountPoint(mount, name) ⇒ Object
Instance Method Details
#FindFirstVolume(name, length = name.size) ⇒ Object
38 39 40 |
# File 'lib/windows/volume.rb', line 38 def FindFirstVolume(name, length=name.size) FindFirstVolume.call(name, length) end |
#FindFirstVolumeMountPoint(name, volume, length = volume.size) ⇒ Object
42 43 44 |
# File 'lib/windows/volume.rb', line 42 def FindFirstVolumeMountPoint(name, volume, length=volume.size) FindFirstVolumeMountPoint.call(name, volume, length) end |
#FindNextVolume(handle, name, length = name.size) ⇒ Object
46 47 48 |
# File 'lib/windows/volume.rb', line 46 def FindNextVolume(handle, name, length=name.size) FindNextVolume.call(handle, name, length) != 0 end |
#FindNextVolumeMountPoint(handle, name, length = name.size) ⇒ Object
50 51 52 |
# File 'lib/windows/volume.rb', line 50 def FindNextVolumeMountPoint(handle, name, length=name.size) FindNextVolumeMountPoint.call(handle, name, length) != 0 end |
#FindVolumeClose(handle) ⇒ Object
54 55 56 |
# File 'lib/windows/volume.rb', line 54 def FindVolumeClose(handle) FindVolumeClose.call(handle) != 0 end |
#FindVolumeMountPointClose(handle) ⇒ Object
58 59 60 |
# File 'lib/windows/volume.rb', line 58 def FindVolumeMountPointClose(handle) FindVolumeMountPointClose.call(handle) != 0 end |
#GetDriveType(path) ⇒ Object
62 63 64 |
# File 'lib/windows/volume.rb', line 62 def GetDriveType(path) GetDriveType.call(path) end |
#GetLogicalDrives ⇒ Object
66 67 68 |
# File 'lib/windows/volume.rb', line 66 def GetLogicalDrives() GetLogicalDrives.call() end |
#GetLogicalDriveStrings(length, buffer) ⇒ Object
70 71 72 |
# File 'lib/windows/volume.rb', line 70 def GetLogicalDriveStrings(length, buffer) GetLogicalDriveStrings.call(length, buffer) end |
#GetVolumeInformation(path, v_buf, v_size, serial, length, flags, fs_buf, fs_size) ⇒ Object
74 75 76 |
# File 'lib/windows/volume.rb', line 74 def GetVolumeInformation(path, v_buf, v_size, serial, length, flags, fs_buf, fs_size) GetVolumeInformation.call(path, v_buf, v_size, serial, length, flags, fs_buf, fs_size) != 0 end |
#GetVolumeNameForVolumeMountPoint(mount, name, length = name.size) ⇒ Object
78 79 80 |
# File 'lib/windows/volume.rb', line 78 def GetVolumeNameForVolumeMountPoint(mount, name, length=name.size) GetVolumeNameForVolumeMountPoint.call(mount, name, length) != 0 end |
#GetVolumePathName(file, name, length = name.size) ⇒ Object
82 83 84 |
# File 'lib/windows/volume.rb', line 82 def GetVolumePathName(file, name, length = name.size) GetVolumePathName.call(file, name, length) != 0 end |
#SetVolumeLabel(label, volume) ⇒ Object
86 87 88 |
# File 'lib/windows/volume.rb', line 86 def SetVolumeLabel(label, volume) SetVolumeLabel.call(label, volume) != 0 end |
#SetVolumeMountPoint(mount, name) ⇒ Object
90 91 92 |
# File 'lib/windows/volume.rb', line 90 def SetVolumeMountPoint(mount, name) SetVolumeMountPoint.call(mount, name) != 0 end |