Method: Zip::ZipFileSystem::ZipFsFile#chown

Defined in:
lib/zip/zipfilesystem.rb

#chown(ownerInt, groupInt, *filenames) ⇒ Object



207
208
209
210
211
212
213
214
215
216
217
# File 'lib/zip/zipfilesystem.rb', line 207

def chown(ownerInt, groupInt, *filenames)
  filenames.each { |fileName|
    e = get_entry(fileName)
    unless e.extra.member?("IUnix")
      e.extra.create("IUnix")
    end
    e.extra["IUnix"].uid = ownerInt
    e.extra["IUnix"].gid = groupInt
  }
  filenames.size
end