#[non_exhaustive]pub struct FileMetadata {Show 19 fields
pub name: String,
pub id: Id,
pub client_modified: DropboxTimestamp,
pub server_modified: DropboxTimestamp,
pub rev: Rev,
pub size: u64,
pub path_lower: Option<String>,
pub path_display: Option<String>,
pub parent_shared_folder_id: Option<SharedFolderId>,
pub preview_url: Option<String>,
pub media_info: Option<MediaInfo>,
pub symlink_info: Option<SymlinkInfo>,
pub sharing_info: Option<FileSharingInfo>,
pub is_downloadable: bool,
pub export_info: Option<ExportInfo>,
pub property_groups: Option<Vec<PropertyGroup>>,
pub has_explicit_shared_members: Option<bool>,
pub content_hash: Option<Sha256HexHash>,
pub file_lock_info: Option<FileLockMetadata>,
}
async_routes
and dbx_files
only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The last component of the path (including extension). This never contains a slash.
id: Id
A unique identifier for the file.
client_modified: DropboxTimestamp
For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.
server_modified: DropboxTimestamp
The last time the file was modified on Dropbox.
rev: Rev
A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.
size: u64
The file size in bytes.
path_lower: Option<String>
The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
path_display: Option<String>
The cased path to be used for display purposes only. In rare instances the casing will not
correctly match the user’s filesystem, but this behavior will match the path provided in the
Core API v1, and at least the last path component will have the correct casing. Changes to
only the casing of paths won’t be returned by
list_folder_continue()
. This field will be null if
the file or folder is not mounted.
Please use FileSharingInfo::parent_shared_folder_id
or
FolderSharingInfo::parent_shared_folder_id
instead.
preview_url: Option<String>
The preview URL of the file.
media_info: Option<MediaInfo>
Additional information if the file is a photo or video. This field will not be set on
entries returned by list_folder()
,
list_folder_continue()
, or
get_thumbnail_batch()
, starting December 2, 2019.
symlink_info: Option<SymlinkInfo>
Set if this file is a symlink.
sharing_info: Option<FileSharingInfo>
Set if this file is contained in a shared folder.
is_downloadable: bool
If true, file can be downloaded directly; else the file must be exported.
export_info: Option<ExportInfo>
Information about format this file can be exported to. This filed must be set if
is_downloadable
is set to false.
property_groups: Option<Vec<PropertyGroup>>
Additional information if the file has custom properties with the property template specified.
This flag will only be present if include_has_explicit_shared_members is true in
list_folder()
or
get_metadata()
. If this flag is present, it will be true if
this file has any explicit shared members. This is different from sharing_info in that this
could be true in the case where a file has explicit members but is not contained within a
shared folder.
content_hash: Option<Sha256HexHash>
A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash page.
file_lock_info: Option<FileLockMetadata>
If present, the metadata associated with the file’s current lock.
Implementations§
Source§impl FileMetadata
impl FileMetadata
pub fn new( name: String, id: Id, client_modified: DropboxTimestamp, server_modified: DropboxTimestamp, rev: Rev, size: u64, ) -> Self
pub fn with_path_lower(self, value: String) -> Self
pub fn with_path_display(self, value: String) -> Self
pub fn with_preview_url(self, value: String) -> Self
pub fn with_media_info(self, value: MediaInfo) -> Self
pub fn with_symlink_info(self, value: SymlinkInfo) -> Self
pub fn with_sharing_info(self, value: FileSharingInfo) -> Self
pub fn with_is_downloadable(self, value: bool) -> Self
pub fn with_export_info(self, value: ExportInfo) -> Self
pub fn with_property_groups(self, value: Vec<PropertyGroup>) -> Self
pub fn with_content_hash(self, value: Sha256HexHash) -> Self
pub fn with_file_lock_info(self, value: FileLockMetadata) -> Self
Trait Implementations§
Source§impl Clone for FileMetadata
impl Clone for FileMetadata
Source§fn clone(&self) -> FileMetadata
fn clone(&self) -> FileMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more