Module: Device::Library::Mac
- Defined in:
- lib/device/library/mac.rb
Instance Method Summary collapse
Instance Method Details
#eject(volume_name) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/device/library/mac.rb', line 19 def eject(volume_name) status, stdio, stderr = systemu("diskutil eject #{volume_name}") unless status.success? raise Device::CantEject, stderr.strip end end |
#get_device_root_dir(volume_name) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/device/library/mac.rb', line 9 def get_device_root_dir(volume_name) %w(/Volumes).each do |mount_root| path = File.join(mount_root, volume_name) if File.directory?(path) return path end end nil end |