Difference between revisions of "API:EPrints/Probity"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
(Removing all content from page)
 
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_
 
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
 
-->{{Pod2Wiki}}{{API:Source|file=EPrints/Probity.pm|package_name=EPrints::Probity}}[[Category:API|Probity]]<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::Probity''' - EPrints Probity Module
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=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.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_process_file -->==process_file==
 
 
  $xml = EPrints::Probity::process_file( $session, $filename, [$name] );
 
 
Process the given file and return an XML chunk in the format.
 
 
&lt;hash&gt;
 
    &lt;name&gt;/opt/eprints3/documents/disk0/00/00/05/04/02/stuff.pdf&lt;/name&gt;
 
    &lt;algorithm&gt;SHA-1&lt;/algorithm&gt;
 
    &lt;value&gt;cc7a32915ab0a73ba1f94b34d3a265bdccd3c8b9&lt;/value&gt;
 
    &lt;date&gt;Fri Sep 27 10:53:10 BST 2002&lt;/date&gt;
 
&lt;/hash&gt;
 
 
 
If $name is not specified then the name is $filename.
 
 
If there is a problem return a empty XML document fragment.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_create_log -->==create_log==
 
 
  $xml = EPrints::Probity::create_log( $session, $filenames, [$outfile] )
 
 
Create an XML file $outfile of the format:
 
 
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 
&lt;hashlist xmlns="http://probity.org/XMLprobity"&gt;
 
    &lt;hash&gt;
 
      &lt;name&gt;/opt/eprints3/documents/disk0/00/00/05/04/02/stuff.pdf&lt;/name&gt;
 
      &lt;algorithm&gt;SHA-1&lt;/algorithm&gt;
 
      &lt;value&gt;cc7a32915ab0a73ba1f94b34d3a265bdccd3c8b9&lt;/value&gt;
 
      &lt;date&gt;Fri Sep 27 10:53:10 BST 2002&lt;/date&gt;
 
    &lt;/hash&gt;
 
    .
 
    .
 
    .
 
 
 
From the filenames in array ref $filenames.
 
 
If $outfile is not specified then the XML is sent to STDOUT.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
 
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_create_log_fh -->==create_log_fh==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
 

Latest revision as of 15:41, 12 August 2009