Class Zip::ZipFileSystem::ZipFsFile::ZipFsStat
In: lib/zip/zipfilesystem.rb
Parent: Object

protected :dir

Methods

blksize   blocks   dev   forward_invoke   ftype   gid   ino   kind_of?   mode   new   nlink   rdev   rdev_major   rdev_minor   uid  

Public Class methods

[Source]

# File lib/zip/zipfilesystem.rb, line 73
        def initialize(zipFsFile, entryName)
          @zipFsFile = zipFsFile
          @entryName = entryName
        end

Public Instance methods

[Source]

# File lib/zip/zipfilesystem.rb, line 144
        def blksize; nil; end

[Source]

# File lib/zip/zipfilesystem.rb, line 97
        def blocks; nil; end

[Source]

# File lib/zip/zipfilesystem.rb, line 124
        def dev; 0; end

[Source]

# File lib/zip/zipfilesystem.rb, line 78
        def forward_invoke(msg)
          @zipFsFile.send(msg, @entryName)
        end

[Source]

# File lib/zip/zipfilesystem.rb, line 132
        def ftype
          if file?
            return "file"
          elsif directory?
            return "directory"
          else
            raise StandardError, "Unknown file type"
          end
        end

[Source]

# File lib/zip/zipfilesystem.rb, line 104
        def gid
          e = get_entry
          if e.extra.member? "IUnix"
            e.extra["IUnix"].gid || 0
          else
            0
          end
        end

[Source]

# File lib/zip/zipfilesystem.rb, line 122
        def ino; 0; end

[Source]

# File lib/zip/zipfilesystem.rb, line 82
        def kind_of?(t)
          super || t == ::File::Stat 
        end

[Source]

# File lib/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

[Source]

# File lib/zip/zipfilesystem.rb, line 142
        def nlink; 1; end

[Source]

# File lib/zip/zipfilesystem.rb, line 126
        def rdev; 0; end

[Source]

# File lib/zip/zipfilesystem.rb, line 128
        def rdev_major; 0; end

[Source]

# File lib/zip/zipfilesystem.rb, line 130
        def rdev_minor; 0; end

[Source]

# File lib/zip/zipfilesystem.rb, line 113
        def uid
          e = get_entry
          if e.extra.member? "IUnix"
            e.extra["IUnix"].uid || 0
          else
            0
          end
        end

[Validate]