NAME

Archive::SCS::HashFS - SCS HashFS version 1 format handler

SYNOPSIS

my $file = Path::Tiny->new('.../base.scs');
my $archive = Archive::SCS::HashFS->new(file => $file)->mount;

$archive->read_dir_tree;
my @contents = sort $archive->list_dirs, $archive->list_files;

my $hash = Archive::SCS::CityHash::cityhash64('def/city.sii');
my $data = $archive->read_entry($hash);

DESCRIPTION

Represents an SCS archive file encoded in HashFS version 1 (basically 1.49 and earlier).

Hash values used with this module must be in the internal format (currently, an 8-byte scalar PV in network byte order).

METHODS

entries

$entry_hashes = $archive->entries;

file

$path_tiny = $archive->file;

is_mounted

$bool = $archive->is_mounted;

handles_file

$bool = Archive::SCS::HashFS->handles_file($fh, $header);

list_dirs

@directories = $archive->list_dirs;

list_files

@files = $archive->list_files;

mount

$archive = $archive->mount;

new

$archive = Archive::SCS::HashFS->new(file => $path_tiny);

read_dir_tree

$archive->read_dir_tree;

read_entry

$data = $archive->read_entry($hash);

unmount

$archive->unmount;

SEE ALSO

AUTHOR

nautofon

COPYRIGHT

This software is copyright (c) 2024 by nautofon.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.