NAME
File::Manifest - objects representing trees of files
SYNOPSIS
my $m = new File::Manifest($dir);
$m->write();
my $old = File::Manifest->load($d1);
my $new = File::Manifest->new($d2);
$old->diff($new);
DESCRIPTION
This module writes manifest files suitable for capturing the "big picture" of a directory tree. In addition to the usual list of files, a simple checksum is always included. You can request an additional checksum by setting the environment variable MANICKSUM to the package name. An interface similar to MD5 or SHA is assumed.
Manifest->new($dir)
Creates an empty manifest object.
Manifest->load($f)
Creates a manifest object by reading the given file or, if the file does not exist, by rereading the directory tree.
$o->mode(0666)
MANIFEST files are created with this mode.
$o->cksums()
Returns the list of checksum objects.
$o->reread_tree()
Rereads the directory tree.
$o->write([$to])
Writes the content of the manifest object to either the file MANIFEST or to a passed-in filehandle.
$o->diff($old, $new)
Returns a report generated by differencing $old and $new manifests. The report is stored as a hash of arrays. The hash is indexed with [=+-!]. These symbols have the same meaning as in a context diff. The arrays hold a list of files for each comparison result.
Checksum::Simple
This package implements a checksum similar to Solaris 2.5.1 /usr/bin/sum (but does not match exactly). It should be portable however, since it is written exclusively in perl.
BUGS
Let me know if you find one!
AUTHOR
Copyright © 1997-1998 Joshua Nathaniel Pritikin. All rights reserved.
This package is free software; you can redistribute it and/or modify it under the same terms as perl itself. This software is provided "as is" without express or implied warranty.
See http://www.perl.com/CPAN/authors/id/JPRIT/ for the latest version!
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 301:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252