Catmandu-FileStore

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/File/Simple/Bag.pm  view on Meta::CPAN

sub get {
    my ($self, $id) = @_;
    my $path = $self->_path;

    my $packed_key = $self->pack_key($id);

    my $file = File::Spec->catfile($path, $packed_key);

    return undef unless -f $file;

    my $stat = [stat($file)];

    my $size     = $stat->[7];
    my $modified = $stat->[9];
    my $created  = $stat->[10];    # no real creation time exists on Unix

    my $content_type = content_type($id);

    return {
        _id          => $id,
        size         => $size,



( run in 1.162 second using v1.01-cache-2.11-cpan-49f99fa48dc )