Class: RIO::ZipFile::RootDir::FS

Inherits:
Object
  • Object
show all
Includes:
FS::Dir, FS::Str, FS::Test
Defined in:
lib/rio/ext/zipfile/fs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FS::Test

#blockdev?, #chardev?, #dir?, #directory?, #executable?, #executable_real?, #exist?, #file?, #grpowned?, #owned?, #pipe?, #readable?, #readable_real?, #setgid?, #setuid?, #size, #size?, #socket?, #sticky?, #symlink?, #writable?, #writable_real?, #zero?

Methods included from FS::Dir

#chdir, #entries, #foreach, #getwd, #glob, #pwd

Methods included from FS::Str

#basename, #cleanpath, #dirname, #extname, #fnmatch?, #join

Constructor Details

#initialize(zipfile) ⇒ FS

Returns a new instance of FS.



47
48
49
50
51
52
53
# File 'lib/rio/ext/zipfile/fs.rb', line 47

def initialize(zipfile)
  @zipfile = zipfile
  @dir = @zipfile.dir
  @file = @zipfile.file
  @test = @zipfile.file
  #p "InFile: #{@file.class}"
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



46
47
48
# File 'lib/rio/ext/zipfile/fs.rb', line 46

def dir
  @dir
end

Instance Method Details

#commit(&block) ⇒ Object

p “InFile: #RIO::ZipFile::RootDir::FS.@[email protected]



54
55
56
57
# File 'lib/rio/ext/zipfile/fs.rb', line 54

def commit(&block)
  yield if block_given?
  @zipfile.commit
end

#mkdir(*args) ⇒ Object



61
62
63
# File 'lib/rio/ext/zipfile/fs.rb', line 61

def mkdir(*args)
  commit{super}
end

#rmdir(*args) ⇒ Object



64
65
66
# File 'lib/rio/ext/zipfile/fs.rb', line 64

def rmdir(*args)
  commit{@dir.rmdir(*args)}
end