extract
Extract the zipped files to the given dest directory.
Function parameters
Parameters
- dest:std.fs.Dir
- fr:*File.Reader
Type definitions in this namespace
Types
Extract the zipped files to the given `dest` directory.
Functions
- extract
- Extract the zipped files to the given `dest` directory.
= [4]u8{ 'P', 'K', 1, 2 }
Values
- central_file_header_sig
- = [4]u8{ 'P', 'K', 1, 2 }
- local_file_header_sig
- = [4]u8{ 'P', 'K', 3, 4 }
- end_record_sig
- = [4]u8{ 'P', 'K', 5, 6 }
- end_record64_sig
- = [4]u8{ 'P', 'K', 6, 6 }
- end_locator64_sig
- = [4]u8{ 'P', 'K', 6, 7 }
Source
Implementation
pub fn extract(dest: std.fs.Dir, fr: *File.Reader, options: ExtractOptions) !void {
if (options.verify_checksums) @panic("TODO unimplemented");
var iter = try Iterator.init(fr);
var filename_buf: [std.fs.max_path_bytes]u8 = undefined;
while (try iter.next()) |entry| {
try entry.extract(fr, options, &filename_buf, dest);
if (options.diagnostics) |d| {
try d.nextFilename(filename_buf[0..entry.filename_len]);
}
}
}