pub struct B2File {Show 15 fields
pub account_id: String,
pub action: B2Action,
pub bucket_id: String,
pub content_length: u64,
pub content_sha1: Option<String>,
pub content_md5: Option<String>,
pub content_type: Option<String>,
pub file_id: String,
pub file_info: HashMap<String, String>,
pub file_name: String,
pub file_retention: Option<B2ObjectLock<B2BucketFileRetention>>,
pub legal_hold: Option<B2ObjectLock<B2FileLegalHold>>,
pub replication_status: Option<B2ReplicationStatus>,
pub server_side_encryption: Option<B2ServerSideEncryption>,
pub upload_timestamp: u64,
}Fields§
§account_id: StringThe account that owns the file.
action: B2Action§bucket_id: StringThe unique identifier of the bucket.
content_length: u64The number of bytes stored in the file. Only useful when the action is “upload”. Always 0 when the action is “start”, “hide”, or “folder”.
content_sha1: Option<String>The SHA1 of the bytes stored in the file as a 40-digit hex string. Large files do not have SHA1 checksums, and the value is “none”. The value is null when the action is “hide”, or “folder”.
content_md5: Option<String>The MD5 of the bytes stored in the file as a 32-digit hex string. Not all files have an MD5 checksum, so this field is optional, and set to null for files that do not have one. Large files do not have MD5 checksums, and the value is null. The value is also null when the action is “hide”, or “folder”.
content_type: Option<String>When the action is “upload” or “start”, the MIME type of the file, as specified when the file was uploaded. For “hide” action, always “application/x-bz-hide-marker”. For “folder” action, always null.
file_id: StringThe unique identifier for this version of this file. Used with b2_get_file_info, b2_download_file_by_id, and b2_delete_file_version. The value is null when for action “folder”.
file_info: HashMap<String, String>The custom information that was uploaded with the file. This is a JSON object, holding the name/value pairs that were uploaded with the file.
file_name: StringThe name of this file, which can be used with b2_download_file_by_name.
file_retention: Option<B2ObjectLock<B2BucketFileRetention>>The Object Lock retention settings for this file, if any.
This field is filtered based on application key capabilities; the readFileRetentions capability is required to access the value.
See Object Lock
for more details on response structure. This field is omitted when the action is “hide”, or “folder”.
legal_hold: Option<B2ObjectLock<B2FileLegalHold>>The Object Lock legal hold status for this file, if any.
This field is filtered based on application key capabilities; the readFileLegalHolds capability is required to access the value.
See Object Lock
for more details on response structure. This field is omitted when the action is “hide”, or “folder”.
replication_status: Option<B2ReplicationStatus>The Replication Status for this file, if any. This field is omitted when the file is not part of a replication rule.
server_side_encryption: Option<B2ServerSideEncryption>When the file is encrypted with Server-Side Encryption, the mode (“SSE-B2” or “SSE-C”) and algorithm used to encrypt the data. If the file is not encrypted with Server-Side Encryption, then both mode and algorithm will be null. This field is omitted when the action is “hide”, or “folder”.
upload_timestamp: u64This is a UTC time when this file was uploaded. It is a base 10 number of milliseconds since midnight, January 1, 1970 UTC. This fits in a 64 bit integer such as the type “long” in the programming language Java. It is intended to be compatible with Java’s time long. For example, it can be passed directly into the java call Date.setTime(long time). Always 0 when the action is “folder”.