Class: TorqueBox::VFS::Ext::VirtualFile
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- TorqueBox::VFS::Ext::VirtualFile
- Defined in:
- lib/torquebox/vfs/ext/virtual_file.rb
Instance Method Summary collapse
- #atime ⇒ Object
- #chmod(mode_int) ⇒ Object
- #chown(owner_int, group_int) ⇒ Object
- #ctime ⇒ Object
- #flock(locking_constant) ⇒ Object
-
#initialize(io, path = nil) ⇒ VirtualFile
constructor
A new instance of VirtualFile.
- #lstat ⇒ Object
- #mtime ⇒ Object
- #o_chmod(mode_int) ⇒ Object
- #path ⇒ Object
- #truncate(max_len) ⇒ Object
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
#atime ⇒ Object
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 |
#ctime ⇒ Object
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 |
#lstat ⇒ Object
50 51 52 |
# File 'lib/torquebox/vfs/ext/virtual_file.rb', line 50 def lstat() ::File.stat( path ) end |
#mtime ⇒ Object
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 |
#path ⇒ Object
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 |