class 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 1728 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 1745 def ==(other) @uid == other.uid && @gid == other.gid end
merge(binstr)
click to toggle source
# File lib/zip/zip.rb, line 1735 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 1754 def pack_for_c_dir "" end
pack_for_local()
click to toggle source
# File lib/zip/zip.rb, line 1750 def pack_for_local [@uid, @gid].pack("vv") end