pub struct FileMetadata {Show 19 fields
pub path: PathBuf,
pub size: u64,
pub modified: i64,
pub created: i64,
pub accessed: i64,
pub permissions: u32,
pub is_dir: bool,
pub is_symlink: bool,
pub is_hidden: bool,
pub is_encrypted: bool,
pub mime_type: Option<String>,
pub file_hash: Option<String>,
pub chunk_hashes: Vec<String>,
pub metadata_hash: String,
pub storage_class: Option<String>,
pub encryption_key_id: Option<String>,
pub version: Option<String>,
pub tags: Vec<String>,
pub custom_metadata: HashMap<String, String>,
}Expand description
文件元数据
Fields§
§path: PathBuf§size: u64§modified: i64§created: i64§accessed: i64§permissions: u32§is_dir: bool§is_symlink: bool§is_encrypted: bool§mime_type: Option<String>§file_hash: Option<String>§chunk_hashes: Vec<String>§metadata_hash: String§storage_class: Option<String>§encryption_key_id: Option<String>§version: Option<String>§custom_metadata: HashMap<String, String>Implementations§
Source§impl FileMetadata
impl FileMetadata
pub fn new(path: PathBuf) -> Self
pub fn from_path(path: &Path) -> Result<Self>
pub fn calculate_hash(&mut self, algorithm: ChecksumType) -> Result<()>
pub fn update_metadata_hash(&mut self)
Trait Implementations§
Source§impl Clone for FileMetadata
impl Clone for FileMetadata
Source§fn clone(&self) -> FileMetadata
fn clone(&self) -> FileMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileMetadata
impl Debug for FileMetadata
Source§impl<'de> Deserialize<'de> for FileMetadata
impl<'de> Deserialize<'de> for FileMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FileMetadata
impl RefUnwindSafe for FileMetadata
impl Send for FileMetadata
impl Sync for FileMetadata
impl Unpin for FileMetadata
impl UnwindSafe for FileMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more