Class: Zip::ZipFileSystem::ZipFsFile::ZipFsStat

Inherits:
Object
  • Object
show all
Defined in:
lib/zip/zipfilesystem.rb

Overview

protected :dir

Instance Method Summary (collapse)

Constructor Details

- (ZipFsStat) initialize(zipFsFile, entryName)



73
74
75
76
# File 'lib/zip/zipfilesystem.rb', line 73

def initialize(zipFsFile, entryName)
  @zipFsFile = zipFsFile
  @entryName = entryName
end

Instance Method Details

- (Object) blksize



144
# File 'lib/zip/zipfilesystem.rb', line 144

def blksize; nil; end

- (Object) blocks



97
# File 'lib/zip/zipfilesystem.rb', line 97

def blocks; nil; end

- (Object) dev



124
# File 'lib/zip/zipfilesystem.rb', line 124

def dev; 0; end

- (Object) forward_invoke(msg)



78
79
80
# File 'lib/zip/zipfilesystem.rb', line 78

def forward_invoke(msg)
  @zipFsFile.send(msg, @entryName)
end

- (Object) ftype



132
133
134
135
136
137
138
139
140
# 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

- (Object) gid



104
105
106
107
108
109
110
111
# 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

- (Object) ino



122
# File 'lib/zip/zipfilesystem.rb', line 122

def ino; 0; end

- (Boolean) kind_of?(t)



82
83
84
# File 'lib/zip/zipfilesystem.rb', line 82

def kind_of?(t)
  super || t == ::File::Stat 
end

- (Object) mode



146
147
148
149
150
151
152
153
# 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


142
# File 'lib/zip/zipfilesystem.rb', line 142

def nlink; 1; end

- (Object) rdev



126
# File 'lib/zip/zipfilesystem.rb', line 126

def rdev; 0; end

- (Object) rdev_major



128
# File 'lib/zip/zipfilesystem.rb', line 128

def rdev_major; 0; end

- (Object) rdev_minor



130
# File 'lib/zip/zipfilesystem.rb', line 130

def rdev_minor; 0; end

- (Object) uid



113
114
115
116
117
118
119
120
# 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