|
|
| 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.
| |
|
| |
| <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.
| |
|
| |
| <!-- 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:
| |
|
| |
| <?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.
| |
|
| |
| <!-- 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 -->
| |