LibreCat::FileStore::Container - Abstract definition of a file storage container
use LibreCat::FileStore::Simple;
my $filestore => LibreCat::FileStore::Simple->new(%options);
my $container = $filestore->get('1234');
my @list_files = $container->list;
if ($container->exists($filename)) {
....
}
$container->add($filename, IO::File->new('/path/to/file'));
my $file = $container->get($filename);
$container->delete($filename);
# write all changes to disk (network , database , ...)
$container->commit;
LibreCat::FileStore::Container is an abstract definition of a storage container. These container are used to store zero or more LibreCat::FileStore::Files.
Retrieve a LibreCat::FileStore::File based on a $key. Returns a LibreCat::FileStore::File on success or undef on failure.
Add a new LibreCat::FileStore::File file to the container. Return 1 on success or undef on failure.
Based on the implementation of LibreCat::FileStore, the files might only be available when changes have been committed.
Commit all changes to the container (write to disk).
Delete a $filename from the container.
Check if a $filename exists in the container.