API:EPrints/Probity
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::Probity - EPrints Probity Module
DESCRIPTION
Every time the files in an EPrint are modified, an checksum of the all the EPrints files is written to a file. This is used in checking the file hasn't been altered by some other means, and also can be used to prove that the file existed on a given date.
See bin/export_hashes for more information.
process_file
$xml = EPrints::Probity::process_file( $session, $filename, [$name] );
Process the given file and return an XML chunk in the format.
<hash> <name>/opt/eprints3/documents/disk0/00/00/05/04/02/stuff.pdf</name> <algorithm>SHA-1</algorithm> <value>cc7a32915ab0a73ba1f94b34d3a265bdccd3c8b9</value> <date>Fri Sep 27 10:53:10 BST 2002</date> </hash>
If $name is not specified then the name is $filename.
If there is a problem return a empty XML document fragment.
create_log
$xml = EPrints::Probity::create_log( $session, $filenames, [$outfile] )
Create an XML file $outfile of the format:
<?xml version="1.0" encoding="UTF-8"?> <hashlist xmlns="http://probity.org/XMLprobity"> <hash> <name>/opt/eprints3/documents/disk0/00/00/05/04/02/stuff.pdf</name> <algorithm>SHA-1</algorithm> <value>cc7a32915ab0a73ba1f94b34d3a265bdccd3c8b9</value> <date>Fri Sep 27 10:53:10 BST 2002</date> </hash> . . .
From the filenames in array ref $filenames.
If $outfile is not specified then the XML is sent to STDOUT.