Abstract Python Module¶
Module for the Abstract Classes.
Abstract Backend Module.
Module that has the Abstract class for Archive Backends Any new backends need to inherit from this class and implement its methods. If the methods are not implemented in the child, the child object will not be able to be instantiated.
-
class
pacifica.archiveinterface.backends.abstract.archive.
AbstractBackendArchive
(prefix)[source]¶ Abstract Base Class for Archive Backends.
-
close
()[source]¶ Close File.
Method that closes an open file for the backend archive that implements this class.
-
open
(filepath, mode)[source]¶ Open File.
Method that opens a file for the backend archive that implements this class Should return a file like object, most likely self. This method is also responsible for making sure the dirname of the filepath exists before trying to open.
-
read
(blocksize)[source]¶ Read File.
Method that reads an open file for the backend archive that implements this class and returns the contents.
-
seek
(offset)[source]¶ Seek to an offset in the file.
Method that seeks to an offset in the file for the backend archive that implements this class.
-
set_file_permissions
()[source]¶ Set permissions for File.
Method that sets a files permissions for the backend archive that implements this class.
-
set_mod_time
(mod_time)[source]¶ Set Modification Time for File.
Method that sets a files mod time for the backend archive that implements this class.
-
stage
()[source]¶ Stage File.
Method that stages a file for the the backend that implements this class Stage moves a file to an appropriate location to be downloaded.
-
Module that has the abstract class for a file’s status.
-
class
pacifica.archiveinterface.backends.abstract.status.
AbstractStatus
(mtime, ctime, bytes_per_level, filesize)[source]¶ Abstract Base Class for Status.
Child backend objects need to implement the following methods to allow file status to function.
-
__init__
(mtime, ctime, bytes_per_level, filesize)[source]¶ Constructor for AbstractClass.
Implemented versions of this class need to set all the attributes defined in this abstract class.
-
bytes_per_level
= None¶
-
ctime
= None¶
-
define_levels
()[source]¶ Defined list of levels.
Method that defines the storage levels in the archive backend. So a backend archive with a disk, tape, and error drive will return the following [“disk”, “tape”, “error”].
-
defined_levels
= None¶
-
file_storage_media
= None¶
-
filepath
= None¶
-
filesize
= None¶
-
find_file_storage_media
()[source]¶ Find File Storage Media.
Method that finds the media the file in the archive backend is stored on. Usually disk or tape.
-
mtime
= None¶
-