Abstraction of a Zip archive. Wraps around Zip::ZipFile of rubyzip
[Source]
# File lib/javaclass/gems/zip_file.rb, line 121 def initialize(file) @archive = file end
List the entries of this zip for the block given.
# File lib/javaclass/gems/zip_file.rb, line 135 def entries(&block) FILESYSTEM.foreach(@archive) do |entry| block.call(ZipEntry.new(entry)) end end
Read the file from archive.
# File lib/javaclass/gems/zip_file.rb, line 126 def read(file) begin FILESYSTEM.open(@archive) { |zipfile| zipfile.file.read(file) } rescue nil end end
[Validate]