Acquire.Client._filehandle module¶
-
class
FileHandle(filename=None, remote_filename=None, aclrules=None, drive_uid=None, user_guid=None, compress=True)[source]¶ Bases:
objectThis class holds all of the information about a file that is held in a Drive, including its size and checksum, and information about previous versions. It provides a handle that you can use to download or delete the file, to upload new versions, or to move the data between hot and cold storage or pay for extended storage
-
compression_type()[source]¶ Return a string describing the compression scheme used by the filehandle when transporting the file, or None if the data is not compressed
-
static
from_data(data)[source]¶ Return an object created from the passed json-deserialised dictionary. Note that this does not contain any information about the local file itself - just the name it should be called on the object store and the size, checksum and acl. If the file (or compressed file) is sufficiently small then this will also contain the packed version of that file data
-
local_filedata(uncompress=False)[source]¶ Return the filedata for this file, assuming it is sufficiently small to be read in this way. Returns ‘None’ if not…
If ‘uncompress’ is true, then uncompress the data (if it is compressed) before returning
-
to_data()[source]¶ Return a json-serialisable dictionary for this object. Note that this does not contain any information about the local file itself - just the name it should be called on the object store and the size, checksum and acl. If the file (or compressed file) is sufficiently small then this will also contain the packed version of that file data
-