Dale Amon > FileHash-0.01-3 > FileHash::Content

Download:
FileHash-0.01-3.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

 FileHash::Content - A Hash of file data keyed by the file's md5sum.

SYNOPSIS ^

 use FileHash::Content;
 $obj = FileHash::Content->alloc;

Inheritance ^

 FileHash::Base

Description ^

This is a container for lists of file name entries. It modifies the definition of hash to to be a combination of an MD5 hash of a file and the length of the file in bytes, a string which will almost certainly be unique on your file system although theoretically you could have collisions:

        "$hash,$size"

Files with the same size and content will be hashed with the same key so that all such instances will be added to the same bucket.

Other than the hash key definition, it inherits its behavior from FileHash::Base.

Examples ^

 use FileHash::Content;
 my $a = FileHash::Content->alloc;
 $a->initFromTree ("/root");

Class Variables ^

 None.

Instance Variables ^

 None.

Class Methods ^

$obj = FileHash::Content->alloc

Allocate an empty instance of FileHash::Content.

Instance Methods ^

 See FileHash::Base.

Private Class Method ^

 None.

Private Instance Methods ^

$key = $obj->_genKey($entry)

Create an appropriate hash key. If needed values are undef, it will generate an md5sum or length of 0 for use in constructing the key.

Errors and Warnings ^

 Lots.

KNOWN BUGS ^

 See TODO.

SEE ALSO ^

 FileHash::Base, FileHash::Entry.

AUTHOR ^

Dale Amon <amon@vnl.com>