Module: Synco::DarwinDisk
- Defined in:
- lib/synco/disk.rb
Constant Summary collapse
- DISKUTIL =
"diskutil"
Class Method Summary collapse
Class Method Details
.available?(disk_name) ⇒ Boolean
47 48 49 |
# File 'lib/synco/disk.rb', line 47 def self.available?(disk_name) system(DISKUTIL, "list", disk_name) end |
.mount(path, disk_name = nil) ⇒ Object
51 52 53 54 55 |
# File 'lib/synco/disk.rb', line 51 def self.mount(path, disk_name = nil) disk_name ||= File.basename(path) system(DISKUTIL, "mount", "-mountPoint", path, disk_name) end |
.unmount(path) ⇒ Object
57 58 59 |
# File 'lib/synco/disk.rb', line 57 def self.unmount(path) system(DISKUTIL, "unmount", path) end |