NAME
File::Sticker::Scribe::Xattr - read, write and standardize meta-data from ExtAttr file
VERSION
version 4.00
SYNOPSIS
use File::Sticker::Scribe::Xattr;
my $obj = File::Sticker::Scribe::Xattr->new(%args);
my %meta = $obj->read_meta($filename);
$obj->write_meta(%args);
DESCRIPTION
This will read and write meta-data from extended user attributes of files, and standardize it to a common nomenclature, such as "tags" for things called tags, or Keywords or Subject etc.
DEBUGGING
whoami
Used for debugging info
METHODS
priority
The priority of this scribe. Scribes with higher priority get tried first. Xattr is a low-priority scribe.
allowed_file
If this scribe can be used for the given file, then this returns true. This can be used with any file, if the filesystem supports extended attributes. I don't know how to test for that, so I'll just assume "yes".
allowed_fields
If this scribe can be used for the known and wanted fields, then this returns true. For Xattr, this always returns true.
if ($scribe->allowed_fields())
{
....
}
known_fields
Returns the fields which this scribe knows about. This scribe has no limitations.
my $known_fields = $scribe->known_fields();
read_meta
Read the meta-data from the given file.
my $meta = $obj->read_meta($filename);
delete_field_from_file
Completely remove the given field. For multi-value fields, it removes ALL the values.
$scribe->delete_field_from_file(filename=>$filename,field=>$field);
Helper Functions
Private interface.
replace_one_field
Overwrite the given field. This does no checking for multi-value fields.
$scribe->replace_one_field(filename=>$filename,field=>$field,value=>$value);
BUGS
Please report any bugs or feature requests to the author.