Archive-SCS
view release on metacpan or search on metacpan
lib/Archive/SCS/Zip.pm view on Meta::CPAN
ADJUST {
$path isa Path::Tiny && $path->exists or croak
"Param file must be a valid Path::Tiny object";
}
method handles_path :common ($path, $header) {
$header =~ /^\Q$LOCAL_HEADER_SIGNATURE\E/
# According to the "appnote" spec, ZIP files don't begin with magic. Instead,
# we'd need to scan the file's last 66 KB for the "end of central directory
# record" signature, then heuristically determine if it looks like a ZIP file.
# However, in practice, the overwhelming majority of ZIP files starts with a
# "local file header" signature, which we can simply check for here.
}
method mount () {
my $filename = $path->basename;
$self->is_mounted and croak sprintf "%s: Already mounted", $filename;
$zip = IO::Uncompress::Unzip->new( "$path", Append => 1 ) or croak
( run in 0.381 second using v1.01-cache-2.11-cpan-64827b87656 )