Class: TorqueBox::VFS::Ext::VirtualFile

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/torquebox/vfs/ext/virtual_file.rb

Instance Method Summary collapse

Constructor Details

#initialize(io, path = nil) ⇒ VirtualFile

Returns a new instance of VirtualFile.



25
26
27
28
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 25

def initialize(io, path=nil)
  super(io)
  @path = path
end

Instance Method Details

#atimeObject



30
31
32
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 30

def atime()
  ::File.atime( path )
end

#chmod(mode_int) ⇒ Object



34
35
36
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 34

def chmod(mode_int)
  ::File.chmod( mode_int, path )
end

#chown(owner_int, group_int) ⇒ Object



38
39
40
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 38

def chown(owner_int, group_int)
  ::File.chown( owner_int, group_int, path )
end

#ctimeObject



42
43
44
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 42

def ctime()
  ::File.ctime( path )
end

#flock(locking_constant) ⇒ Object



46
47
48
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 46

def flock(locking_constant)
  # not supported
end

#lstatObject



50
51
52
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 50

def lstat()
  ::File.stat( path )
end

#mtimeObject



54
55
56
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 54

def mtime()
  ::File.mtime( path )
end

#o_chmod(mode_int) ⇒ Object



58
59
60
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 58

def o_chmod(mode_int)
  self.chmod(mode_int)
end

#pathObject



62
63
64
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 62

def path()
  @path
end

#truncate(max_len) ⇒ Object



66
67
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 66

def truncate(max_len)
end