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


FileHash documentation  | view source Contained in the FileHash distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

Inheritance

Top

 FileHash::Base

Description

Top

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

Top

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

Class Variables

Top

 None.

Instance Variables

Top

 None.

Class Methods

Top

$obj = FileHash::Content->alloc

Allocate an empty instance of FileHash::Content.

Instance Methods

Top

 See FileHash::Base.

Private Class Method

Top

 None.

Private Instance Methods

Top

$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

Top

 Lots.

KNOWN BUGS

Top

 See TODO.

SEE ALSO

Top

 FileHash::Base, FileHash::Entry.

AUTHOR

Top

Dale Amon <amon@vnl.com>


FileHash documentation  | view source Contained in the FileHash distribution.