Tar Utilities Python Module¶
Utilities and classes for unbundling and archiving a tar file.
-
class
pacifica.ingest.tarutils.
FileIngester
(hashtype, hashcode, file_id)[source]¶ Class to ingest a single file from a tar file into the file archives.
-
file_id
= 0¶
-
fileobj
= None¶
-
hashval
= None¶
-
recorded_hash
= ''¶
-
server
= ''¶
-
-
exception
pacifica.ingest.tarutils.
HashValidationException
[source]¶ Class to capture hashsum validation failures.
-
class
pacifica.ingest.tarutils.
MetaParser
[source]¶ Class used to hold and search metadata.
-
file_count
= -999¶
-
files
= {}¶
-
meta
= None¶
-
meta_str
= ''¶
-
start_id
= -999¶
-
transaction_id
= -999¶
-
-
class
pacifica.ingest.tarutils.
TarIngester
(tar, meta)[source]¶ Class to read a tar file and upload it to the metadata and file archives.
-
meta
= None¶
-
tar
= None¶
-
-
pacifica.ingest.tarutils.
file_count
(tar)[source]¶ Retrieve the file count for a tar file.
Does not count metadata.txt as that is not uploaded to the file archive
-
pacifica.ingest.tarutils.
get_clipped
(fname)[source]¶ Return a file path with the data separator removed.