Class: VBox::File

Inherits:
Base
  • Object
show all
Defined in:
lib/virtualbox/classes/file.rb

Direct Known Subclasses

GuestFile

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#_this, #delete!, #ensure_hash, #initialize, #vbox_class

Constructor Details

This class inherits a constructor from VBox::Base

Instance Attribute Details

#refObject (readonly)

Returns the value of attribute ref.



4
5
6
# File 'lib/virtualbox/classes/file.rb', line 4

def ref
  @ref
end

Instance Method Details

#closeObject

Methods



34
35
36
# File 'lib/virtualbox/classes/file.rb', line 34

def close
  VBox::WebService.send_request(:i_file_close, _this)
end

#creation_modeObject

Attributes



8
9
10
# File 'lib/virtualbox/classes/file.rb', line 8

def creation_mode
  VBox::WebService.send_request(:i_file_get_creation_mode, _this)
end

#dispositionObject



12
13
14
# File 'lib/virtualbox/classes/file.rb', line 12

def disposition
  VBox::WebService.send_request(:i_file_get_disposition, _this)
end

#file_nameObject



16
17
18
# File 'lib/virtualbox/classes/file.rb', line 16

def file_name
  VBox::WebService.send_request(:i_file_get_file_name, _this)
end

#initial_sizeObject



20
21
22
# File 'lib/virtualbox/classes/file.rb', line 20

def initial_size
  VBox::WebService.send_request(:i_file_get_initial_size, _this)
end

#offsetObject



28
29
30
# File 'lib/virtualbox/classes/file.rb', line 28

def offset
  VBox::WebService.send_request(:i_file_get_offset, _this)
end

#open_modeObject



24
25
26
# File 'lib/virtualbox/classes/file.rb', line 24

def open_mode
  VBox::WebService.send_request(:i_file_get_open_mode, _this)
end

#query_infoObject



38
39
40
41
# File 'lib/virtualbox/classes/file.rb', line 38

def query_info
  info = VBox::WebService.send_request(:i_file_query_info, _this)
  VBox::FsObjInfo.new(info)
end

#read(args = {}) ⇒ Object



43
44
45
46
# File 'lib/virtualbox/classes/file.rb', line 43

def read(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_file_read, _this.merge(args))
end

#read_at(args = {}) ⇒ Object



48
49
50
51
# File 'lib/virtualbox/classes/file.rb', line 48

def read_at(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_file_read_at, _this.merge(args))
end

#seek(args = {}) ⇒ Object



53
54
55
56
# File 'lib/virtualbox/classes/file.rb', line 53

def seek(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_file_seek, _this.merge(args))
end

#set_acl(args = {}) ⇒ Object



58
59
60
61
# File 'lib/virtualbox/classes/file.rb', line 58

def set_acl(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_file_set_acl, _this.merge(args))
end

#write(args = {}) ⇒ Object



63
64
65
66
# File 'lib/virtualbox/classes/file.rb', line 63

def write(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_file_write, _this.merge(args))
end

#write_at(args = {}) ⇒ Object



68
69
70
71
# File 'lib/virtualbox/classes/file.rb', line 68

def write_at(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_file_write_at, _this.merge(args))
end