Provided by: libcatmandu-filestore-perl_1.16-2_all bug

NAME

       Catmandu::FileBag::Index - Flag a Bag as a FileStore Index

SYNOPSIS

           use Catmandu;

           my $store = Catmandu->store('Simple' , root => 't/data');

           # List all containers
           $store->bag->each(sub {
               my $container = shift;

               print "%s\n" , $container->{_id};
           });

           # Add a new folder
           $store->bag->add({ _id => '1234' });

           # Get the v
           my $files = $store->bag->files('1234');

           # Add a file to the files
           $files->upload(IO::File->new('<foobar.txt'), 'foobar.txt');

           # Stream the contents of a file
           $files->stream(IO::File->new('>foobar.txt'), 'foobar.txt');

           # Delete a file
           $files->delete('foobar.txt');

           # Delete a folder
           $store->bag->delete('1234');

DESCRIPTION

       Each Catmandu::FileBag is a Catmandu::Bag and inherits all its methods.

METHODS

   files($id)
       Return the Catmandu::FileBag for this Catmandu::FileStore containing all the files

SEE ALSO

       Catmandu::FileStore , Catmandu::FileBag