In Files

Zip::ZipExtraField::IUnix

Info-ZIP Extra for UNIX uid/gid

Constants

HEADER_ID

Attributes

gid[RW]
uid[RW]

Public Class Methods

new(binstr = nil) click to toggle source
# File lib/zip/zip.rb, line 1762
def initialize(binstr = nil)
  @uid = 0
  @gid = 0
  binstr and merge(binstr)
end

Public Instance Methods

==(other) click to toggle source
# File lib/zip/zip.rb, line 1779
def ==(other)
  @uid == other.uid &&
  @gid == other.gid
end
merge(binstr) click to toggle source
# File lib/zip/zip.rb, line 1769
def merge(binstr)
  binstr == "" and return
  size, content = initial_parse(binstr)
  # size: 0 for central direcotry. 4 for local header
  return if(! size || size == 0)
  uid, gid = content.unpack("vv")
  @uid ||= uid
  @gid ||= gid
end
pack_for_c_dir() click to toggle source
# File lib/zip/zip.rb, line 1788
def pack_for_c_dir
  ""
end
pack_for_local() click to toggle source
# File lib/zip/zip.rb, line 1784
def pack_for_local
  [@uid, @gid].pack("vv")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.