Module: ZipKit::RemoteUncap
- Defined in:
- lib/zip_kit/remote_uncap.rb
Overview
Alows reading the central directory of a remote ZIP file without
downloading the entire file. The central directory provides the
offsets at which the actual file contents is located. You can then
use the Range:
HTTP headers to download those entries separately.
Please read the security warning in FileReader
VERY CAREFULLY
before you use this module.
Class Method Summary collapse
-
.files_within_zip_at(uri, reader_class: ZipKit::FileReader, **options_for_zip_reader) ⇒ Array<ZipKit::FileReader::ZipEntry>
FileReader when reading files within the remote archive.
Class Method Details
.files_within_zip_at(uri, reader_class: ZipKit::FileReader, **options_for_zip_reader) ⇒ Array<ZipKit::FileReader::ZipEntry>
FileReader when reading files within the remote archive
17 18 19 20 21 |
# File 'lib/zip_kit/remote_uncap.rb', line 17 def self.files_within_zip_at(uri, reader_class: ZipKit::FileReader, **) fake_io = ZipKit::RemoteIO.new(uri) reader = reader_class.new reader.read_zip_structure(io: fake_io, **) end |