Struct cap_async_std::fs::Metadata [−][src]
pub struct Metadata { /* fields omitted */ }Metadata information about a file.
This corresponds to std::fs::Metadata.
Implementations
impl Metadata[src]
impl Metadata[src]pub fn from_file(file: &File) -> Result<Metadata, Error>[src]
pub fn from_file(file: &File) -> Result<Metadata, Error>[src]Constructs a new instance of Self from the given std::fs::File.
pub fn from_just_metadata(std: Metadata) -> Metadata[src]
pub fn from_just_metadata(std: Metadata) -> Metadata[src]Constructs a new instance of Self from the given
std::fs::Metadata.
As with the comments in std::fs::Metadata::volume_serial_number and
nearby functions, some fields of the resulting metadata will be None.
pub const fn file_type(&self) -> FileType[src]
pub const fn file_type(&self) -> FileType[src]Returns the file type for this metadata.
This corresponds to std::fs::Metadata::file_type.
pub fn is_dir(&self) -> bool[src]
pub fn is_dir(&self) -> bool[src]Returns true if this metadata is for a directory.
This corresponds to std::fs::Metadata::is_dir.
pub fn is_file(&self) -> bool[src]
pub fn is_file(&self) -> bool[src]Returns true if this metadata is for a regular file.
This corresponds to std::fs::Metadata::is_file.
pub const fn len(&self) -> u64[src]
pub const fn len(&self) -> u64[src]Returns the size of the file, in bytes, this metadata is for.
This corresponds to std::fs::Metadata::len.
pub fn permissions(&self) -> Permissions[src]
pub fn permissions(&self) -> Permissions[src]Returns the permissions of the file this metadata is for.
This corresponds to std::fs::Metadata::permissions.
pub fn modified(&self) -> Result<SystemTime, Error>[src]
pub fn modified(&self) -> Result<SystemTime, Error>[src]Returns the last modification time listed in this metadata.
This corresponds to std::fs::Metadata::modified.
pub fn accessed(&self) -> Result<SystemTime, Error>[src]
pub fn accessed(&self) -> Result<SystemTime, Error>[src]Returns the last access time of this metadata.
This corresponds to std::fs::Metadata::accessed.
pub fn created(&self) -> Result<SystemTime, Error>[src]
pub fn created(&self) -> Result<SystemTime, Error>[src]Returns the creation time listed in this metadata.
This corresponds to std::fs::Metadata::created.
Trait Implementations
impl MetadataExt for Metadata[src]
impl MetadataExt for Metadata[src]pub fn rdev(&self) -> u64[src]
pub fn rdev(&self) -> u64[src]Returns the device ID of this file (if it is a special one). Read more
pub fn atime(&self) -> i64[src]
pub fn atime(&self) -> i64[src]Returns the last access time of the file, in seconds since Unix Epoch. Read more
pub fn atime_nsec(&self) -> i64[src]
pub fn atime_nsec(&self) -> i64[src]pub fn mtime(&self) -> i64[src]
pub fn mtime(&self) -> i64[src]Returns the last modification time of the file, in seconds since Unix Epoch. Read more
pub fn mtime_nsec(&self) -> i64[src]
pub fn mtime_nsec(&self) -> i64[src]pub fn ctime(&self) -> i64[src]
pub fn ctime(&self) -> i64[src]Returns the last status change time of the file, in seconds since Unix Epoch. Read more
pub fn ctime_nsec(&self) -> i64[src]
pub fn ctime_nsec(&self) -> i64[src]Auto Trait Implementations
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more