Class: Mount::Update
- Inherits:
-
Object
- Object
- Mount::Update
- Defined in:
- lib/rbmount/update.rb
Instance Method Summary collapse
- #filename ⇒ Object
- #finalize ⇒ Object
- #fs ⇒ Object
- #fs=(mountflags, target, fsp = nil) ⇒ Object
-
#initialize ⇒ Update
constructor
A new instance of Update.
- #mflags ⇒ Object
- #read_only=(is_read_only) ⇒ Object
- #ready? ⇒ Boolean
- #table(lc = nil) ⇒ Object
- #to_c ⇒ Object
Constructor Details
Instance Method Details
#filename ⇒ Object
36 37 38 |
# File 'lib/rbmount/update.rb', line 36 def filename Mount::C.mnt_update_get_filename(@pointer) end |
#finalize ⇒ Object
65 66 67 |
# File 'lib/rbmount/update.rb', line 65 def finalize Mount::C.mnt_free_update(@pointer) end |
#fs ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/rbmount/update.rb', line 40 def fs Mount::C.mnt_update_get_fs(@pointer).tap {|fsp| break Mount::FS.allocate.tap {|f| f.instance_eval { @pointer = fsp ObjectSpace.define_finalizer(self, method(:finalize)) }} } end |
#fs=(mountflags, target, fsp = nil) ⇒ Object
57 58 59 |
# File 'lib/rbmount/update.rb', line 57 def fs= (mountflags, target, fsp=nil) Mount::C.mnt_update_set_fs(@pointer, mountflags, target, (fsp ? fsp.to_c : fsp)) end |
#mflags ⇒ Object
49 50 51 |
# File 'lib/rbmount/update.rb', line 49 def mflags Mount::C.mnt_update_get_mflags(@pointer) end |
#read_only=(is_read_only) ⇒ Object
32 33 34 |
# File 'lib/rbmount/update.rb', line 32 def read_only= (is_read_only) Mount::C.mnt_update_force_rdonly(@pointer, !!is_read_only) end |
#ready? ⇒ Boolean
53 54 55 |
# File 'lib/rbmount/update.rb', line 53 def ready? Mount::C.mnt_update_is_ready(@pointer) end |
#table(lc = nil) ⇒ Object
61 62 63 |
# File 'lib/rbmount/update.rb', line 61 def table (lc=nil) Mount::C.mnt_update_table(@pointer, (lc ? lc.to_c : lc)) end |
#to_c ⇒ Object
69 70 71 |
# File 'lib/rbmount/update.rb', line 69 def to_c @pointer end |