Class: Zip::ZipFileSystem::ZipFsFile::ZipFsStat
- Defined in:
- lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb
Overview
protected :dir
Instance Method Summary collapse
- #blksize ⇒ Object
- #blocks ⇒ Object
- #dev ⇒ Object
- #forward_invoke(msg) ⇒ Object
- #ftype ⇒ Object
- #gid ⇒ Object
-
#initialize(zipFsFile, entryName) ⇒ ZipFsStat
constructor
A new instance of ZipFsStat.
- #ino ⇒ Object
- #kind_of?(t) ⇒ Boolean
- #mode ⇒ Object
- #nlink ⇒ Object
- #rdev ⇒ Object
- #rdev_major ⇒ Object
- #rdev_minor ⇒ Object
- #uid ⇒ Object
Constructor Details
#initialize(zipFsFile, entryName) ⇒ ZipFsStat
Returns a new instance of ZipFsStat.
73 74 75 76 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 73 def initialize(zipFsFile, entryName) @zipFsFile = zipFsFile @entryName = entryName end |
Instance Method Details
#blksize ⇒ Object
144 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 144 def blksize; nil; end |
#blocks ⇒ Object
97 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 97 def blocks; nil; end |
#dev ⇒ Object
124 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 124 def dev; 0; end |
#forward_invoke(msg) ⇒ Object
78 79 80 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 78 def forward_invoke(msg) @zipFsFile.send(msg, @entryName) end |
#ftype ⇒ Object
132 133 134 135 136 137 138 139 140 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 132 def ftype if file? return "file" elsif directory? return "directory" else raise StandardError, "Unknown file type" end end |
#gid ⇒ Object
104 105 106 107 108 109 110 111 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 104 def gid e = get_entry if e.extra.member? "IUnix" e.extra["IUnix"].gid || 0 else 0 end end |
#ino ⇒ Object
122 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 122 def ino; 0; end |
#kind_of?(t) ⇒ Boolean
82 83 84 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 82 def kind_of?(t) super || t == ::File::Stat end |
#mode ⇒ Object
146 147 148 149 150 151 152 153 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 146 def mode e = get_entry if e.fstype == 3 e.externalFileAttributes >> 16 else 33206 # 33206 is equivalent to -rw-rw-rw- end end |
#nlink ⇒ Object
142 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 142 def nlink; 1; end |
#rdev ⇒ Object
126 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 126 def rdev; 0; end |
#rdev_major ⇒ Object
128 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 128 def rdev_major; 0; end |
#rdev_minor ⇒ Object
130 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 130 def rdev_minor; 0; end |
#uid ⇒ Object
113 114 115 116 117 118 119 120 |
# File 'lib/ruby_archive/handlers/rubyzip/zip/zipfilesystem.rb', line 113 def uid e = get_entry if e.extra.member? "IUnix" e.extra["IUnix"].uid || 0 else 0 end end |