NAME

FFRIndexed::File - entry for a ressource

SYNOPSIS

  my $idx = FFRIndexed->new();
  my $resultset = $idx->query({ mime_type => 'audio/mpeg' });

  for my $mp3 (@$resultset) {
    printf "%s\t%s\t%s\n", $mp3->artist, $mp3->track, $mp3->title;
  };

CAVEATS

Since this package implements the accessors for all hash entries via $AUTOLOAD, the usual caveats about inherited $AUTOLOAD apply.

This package is a bastardized, simplified version of Class::DBI, for a very specialized purpose. In the far future, this should be unified with the relevant parts of Class::DBI instead of reimplementing it.

$f->filename

Returns the filename including the full path

$file->stale

Returns true if the on-disk and in-database data for the file differ. This should be relatively fast as "only" a stat call and a few reads of the file are done. The md5 (for example) is not recalculated.

$file->rescan

Rescans the information from the on-disk storage into the database. This will take some time.

$file->refresh

Convenience method. Checks the row for stale-ness and rescans the data if it is found to be stale.

$file->unlink

Deletes the file from disk and from the database.

SEE ALSO

Table::Denormalized::Row, another bastardized version of what Class::DBI provides.