FFRIndexed::File - entry for a ressource
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;
};
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->filenameReturns the filename including the full path
$file->staleReturns 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->rescanRescans the information from the on-disk storage into the database. This will take some time.
$file->refreshConvenience method. Checks the row for stale-ness and rescans the data if it is found to be stale.
$file->unlinkDeletes the file from disk and from the database.
Table::Denormalized::Row, another bastardized version of what Class::DBI provides.