Class: Zip::ZipFileSystem::ZipFsFile::ZipFsStat
- Defined in:
- lib/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.
28 29 30 31 |
# File 'lib/zip/zipfilesystem.rb', line 28 def initialize(zipFsFile, entryName) @zipFsFile = zipFsFile @entryName = entryName end |
Instance Method Details
#blksize ⇒ Object
99 |
# File 'lib/zip/zipfilesystem.rb', line 99 def blksize; nil; end |
#blocks ⇒ Object
52 |
# File 'lib/zip/zipfilesystem.rb', line 52 def blocks; nil; end |
#dev ⇒ Object
79 |
# File 'lib/zip/zipfilesystem.rb', line 79 def dev; 0; end |
#forward_invoke(msg) ⇒ Object
33 34 35 |
# File 'lib/zip/zipfilesystem.rb', line 33 def forward_invoke(msg) @zipFsFile.send(msg, @entryName) end |
#ftype ⇒ Object
87 88 89 90 91 92 93 94 95 |
# File 'lib/zip/zipfilesystem.rb', line 87 def ftype if file? return "file" elsif directory? return "directory" else raise StandardError, "Unknown file type" end end |
#gid ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/zip/zipfilesystem.rb', line 59 def gid e = get_entry if e.extra.member? "IUnix" e.extra["IUnix"].gid || 0 else 0 end end |
#ino ⇒ Object
77 |
# File 'lib/zip/zipfilesystem.rb', line 77 def ino; 0; end |
#kind_of?(t) ⇒ Boolean
37 38 39 |
# File 'lib/zip/zipfilesystem.rb', line 37 def kind_of?(t) super || t == ::File::Stat end |
#mode ⇒ Object
101 102 103 104 105 106 107 108 |
# File 'lib/zip/zipfilesystem.rb', line 101 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
97 |
# File 'lib/zip/zipfilesystem.rb', line 97 def nlink; 1; end |
#rdev ⇒ Object
81 |
# File 'lib/zip/zipfilesystem.rb', line 81 def rdev; 0; end |
#rdev_major ⇒ Object
83 |
# File 'lib/zip/zipfilesystem.rb', line 83 def rdev_major; 0; end |
#rdev_minor ⇒ Object
85 |
# File 'lib/zip/zipfilesystem.rb', line 85 def rdev_minor; 0; end |
#uid ⇒ Object
68 69 70 71 72 73 74 75 |
# File 'lib/zip/zipfilesystem.rb', line 68 def uid e = get_entry if e.extra.member? "IUnix" e.extra["IUnix"].uid || 0 else 0 end end |