Sha256: 7906fb8872e36dac8c5cd0797a646d8294b99724414ee85ac6e270aa46e1e553
Contents?: true
Size: 586 Bytes
Versions: 4
Compression:
Stored size: 586 Bytes
Contents
require 'digest/md5' require 'ruby-wmi' class DriveInfo def self.md5sum_disk(dir) digest = Digest::MD5.new() Dir[dir + "VIDEO_TS/*.IFO"].sort.each{|f| digest << File.binread(f) } digest.hexdigest end def self.get_dvd_drives_as_win32ole disks = WMI::Win32_LogicalDisk.find(:all) disks.select{|d| d.Description =~ /CD-ROM/} # hope this works... end def self.get_drive_with_most_space_with_slash disks = WMI::Win32_LogicalDisk.find(:all) most_space = disks.sort_by{|d| d.FreeSpace.to_i}[-1] most_space.Name + "\\" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sensible-cinema-0.16.2 | lib/drive_info.rb |
sensible-cinema-0.16.1 | lib/drive_info.rb |
sensible-cinema-0.15.0 | lib/drive_info.rb |
sensible-cinema-0.14.6 | lib/drive_info.rb |