NAME

Archive::SCS::Directory - File system directory format handler

SYNOPSIS

my $path = Path::Tiny->new('dir/');
my $dir = Archive::SCS::Directory->new(path => $path)->mount;

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

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

DESCRIPTION

Represents an SCS archive that's actually a directory in the file system. Useful for partially extracted archive files.

Symbolic links are supported, as long as they don't form a loop. Changes to the contents of a mounted directory are not observed. The directory tree is only read during mounting. To update the object's view of a directory, unmount(), then mount().

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

Since version 1.06.

METHODS

entries

$entry_hashes = $dir->entries;

ignore

$dir->ignore($regexp);

is_mounted

$bool = $dir->is_mounted;

handles_path

$bool = Archive::SCS::Directory->handles_path($path, $header);

list_dirs

@subdirs = $dir->list_dirs;

list_files

@files = $dir->list_files;

mount

$dir = $dir->mount;

new

$dir = Archive::SCS::Directory->new(path => $path_tiny);
$dir = Archive::SCS::Directory->new(path => $path_tiny, ignore => qr//);

path

$path_tiny = $dir->path;

read_dir_tree

$dir->read_dir_tree; # no-op

read_entry

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

unmount

$dir->unmount;

AUTHOR

nautofon

COPYRIGHT

This software is copyright (c) 2025 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.