Class: VBox::File

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

Direct Known Subclasses

GuestFile

Instance Attribute Summary

Attributes inherited from Base

#ref

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 Method Details

#closeObject

Methods



32
33
34
# File 'lib/virtualbox/classes/file.rb', line 32

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

#creation_modeObject

Attributes



6
7
8
# File 'lib/virtualbox/classes/file.rb', line 6

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

#dispositionObject



10
11
12
# File 'lib/virtualbox/classes/file.rb', line 10

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

#file_nameObject



14
15
16
# File 'lib/virtualbox/classes/file.rb', line 14

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

#initial_sizeObject



18
19
20
# File 'lib/virtualbox/classes/file.rb', line 18

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

#offsetObject



26
27
28
# File 'lib/virtualbox/classes/file.rb', line 26

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

#open_modeObject



22
23
24
# File 'lib/virtualbox/classes/file.rb', line 22

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

#query_infoObject



36
37
38
39
# File 'lib/virtualbox/classes/file.rb', line 36

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

#read(args = {}) ⇒ Object



41
42
43
44
# File 'lib/virtualbox/classes/file.rb', line 41

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

#read_at(args = {}) ⇒ Object



46
47
48
49
# File 'lib/virtualbox/classes/file.rb', line 46

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

#seek(args = {}) ⇒ Object



51
52
53
54
# File 'lib/virtualbox/classes/file.rb', line 51

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

#set_acl(args = {}) ⇒ Object



56
57
58
59
# File 'lib/virtualbox/classes/file.rb', line 56

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

#write(args = {}) ⇒ Object



61
62
63
64
# File 'lib/virtualbox/classes/file.rb', line 61

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

#write_at(args = {}) ⇒ Object



66
67
68
69
# File 'lib/virtualbox/classes/file.rb', line 66

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