Acquire.Storage._fileinfo module¶
-
class
FileInfo(drive_uid=None, filehandle=None, identifiers=None, upstream=None)[source]¶ Bases:
objectThis class provides information about a user-file that has been uploaded to the storage service. This includes all versions of the file, the ACLs for different users etc.
Just as Acquire.Client.Drive provides the client-side view of Acquire.Storage.DriveInfo, so to does Acquire.Client.FileHandle provide the client-side view of Acquire.Storage.FileInfo
-
aclrules(version=None)[source]¶ Return the ACL rules for the specified user, or if that is not specified, the ACL rules for the current version
-
checksum(version=None)[source]¶ Return the checksum of the latest (or specified) version of this file
-
compression_type(version=None)[source]¶ Return the compression type (or None if not compressed) of the latest (or specified) version of this file
-
filesize(version=None)[source]¶ Return the size (in bytes) of the latest (or specified) version of this file
-
static
from_data(data, identifiers=None, upstream=None)[source]¶ Return this object constructed from the passed json-deserialised dictionary. If ‘identifier’ and ‘upstream’ are passed then these set the user identifiers and upstream ACL of the file object as it was opened.
-
get_filemeta(version=None)[source]¶ Return the metadata about the latest (or specified) version of this file. If ‘resolved_acl’ is specified, then return the
-
is_compressed(version=None)[source]¶ Return whether or not the latest (or specified) version of this file is stored and transmitted in a compressed state
-
latest_version()[source]¶ Return the latest version of this file on the storage service. This is a datetime of the upload of the latest version. You will need to use the ‘versions’ function to find if there are other versions.
-
static
list_versions(drive, filename, identifiers=None, upstream=None, include_metadata=False)[source]¶ List all of the versions of this file. If ‘include_metadata’ is True then this will load all of the associated metadata for each file
-
-
class
VersionInfo(filesize=None, checksum=None, aclrules=None, compression=None, identifiers=None)[source]¶ Bases:
objectThis class holds specific info about a version of a file
-
compression_type()[source]¶ Return the type of compression used if this file is stored and transmitted in a compressed state, or None if this is not compressed
-
static
from_data(data)[source]¶ Return this object constructed from the passed json-deserialised dictionary
-