NAME

Digest::Directory::API - api class for Directory Digests

SYNOPSIS

  use Digest::Directory::API;
 
  my($d) = Digest::Directory::API->new();
  $d->quiet(0);
  $d->configure("/etc/dirgests.conf");
  my($r) = $d->compare("", "", "", "/etc/dirgests.text", 0, 0);
  ( $r > 0 ) && print "Warning: dirgests changed - inspect!\n";
  

REQUIRES

Perl 5.004, Digest::Directory::BASE.

EXPORTS

Nothing.

DESCRIPTION

Digest::Directory::API provides a more general API over Digest::Directory::BASE that allows clients to configure, create, show, compare and update directory digests.

METHODS

The following methods are provided:

$dirgest = Digest::Directory::API->new( )

Create a dirgest instance; default configuration is set up, with quiet = 0.

$dirgest->quiet( $enabled )

Enable quiet operating mode for a dirgest; ensures that no debug trace output is provided during operation.

$enabled => '0' or '1' for whether operation to be quiet or not;

$dirgest->trim( $count )

Enable trim level, at specified count; all file/directory sets will have their prefix trimmed.

$count => 'n' where 'n' >= 0 && specifies the number of leading components of a name to remove.

$result = $dirgest->configure( $file, \@incl, \@excl )

Specify configuration for a dirgest;

$file => filename to read configuration from in the format as specified in Digest::Directory::BASE.pm;

\@incl => array of file/directory sets to include (in addition to those read from configuration file);

\@excl => array of file/directory sets to exclude (in addition to those read from configuration file);

return => '1' on success, or '0' on failure;

$result = $dirgest->create( $link, $user, $pass, $file, $nodetails, $nosummary )

Create a dirgest and save to specified file;

$link => the link to fetch dirgests from;

$user => the http username to use with $link;

$pass => the http password to use with $link;

$file => the file to save dirgests to;

$nodetails => don't show detail dirgests during activity;

$nosummary => don't show summary dirgest during activity;

return => '1' on success, or '0' on failure;

$result = $dirgest->show( $link, $user, $pass, $nodetails, $nosummary )

Show a dirgest from a resource with options;

$link => the link to fetch dirgests from;

$user => the http username to use with $link;

$pass => the http password to use with $link;

$file => the file to save dirgests to;

$nodetails => don't show detail dirgests during activity;

$nosummary => don't show summary dirgest during activity;

return => '1' on success, or '0' on failure;

$result = $dirgest->compare( $link, $user, $pass, $file, $nodetails, $nosummary, $showequal )

Compare dirgests as obtained from resources or locally;

$link => the link to fetch dirgests from;

$user => the http username to use with $link;

$pass => the http password to use with $link;

$file => the file to save dirgests to;

$nodetails => don't show detail dirgests during activity;

$nosummary => don't show summary dirgest during activity;

$showequal => show equal dirgests during activity;

return => '1' on success, or '0' on failure;

$result = $dirgest->update( $link, $user, $pass, $file, $nodetails, $nosummary, $showequal )

Update a dirgest from a resource back to resource;

$link => the link to fetch dirgests from;

$user => the http username to use with $link;

$pass => the http password to use with $link;

$file => the file to save dirgests to;

$nodetails => don't show detail dirgests during activity;

$nosummary => don't show summary dirgest during activity;

$showequal => show equal dirgests during activity;

return => '1' on success, or '0' on failure;

AUTHOR

Matthew Gream (MGREAM) <matthew.gream@pobox.com>

VERSION

Version 0.90.

RIGHTS

Copyright 2002 Matthew Gream. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.