[−][src]Struct cap_std::fs::Metadata
Metadata information about a file.
This corresponds to std::fs::Metadata
.
Implementations
impl Metadata
[src]
pub fn from_std(std: Metadata) -> Metadata
[src]
Constructs a new instance of Self
from the given std::fs::Metadata
.
pub 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]
Returns true
if this metadata is for a directory.
This corresponds to std::fs::Metadata::is_dir
.
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 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]
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]
Returns the last modification time listed in this metadata.
This corresponds to std::fs::Metadata::modified
.
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]
Returns the creation time listed in this metadata.
This corresponds to std::fs::Metadata::created
.
Trait Implementations
impl Clone for Metadata
[src]
impl Debug for Metadata
[src]
impl MetadataExt for Metadata
[src]
fn dev(&self) -> u64
[src]
fn ino(&self) -> u64
[src]
fn mode(&self) -> u32
[src]
fn nlink(&self) -> u64
[src]
fn uid(&self) -> u32
[src]
fn gid(&self) -> u32
[src]
fn rdev(&self) -> u64
[src]
fn size(&self) -> u64
[src]
fn atime(&self) -> i64
[src]
fn atime_nsec(&self) -> i64
[src]
fn mtime(&self) -> i64
[src]
fn mtime_nsec(&self) -> i64
[src]
fn ctime(&self) -> i64
[src]
fn ctime_nsec(&self) -> i64
[src]
fn blksize(&self) -> u64
[src]
fn blocks(&self) -> u64
[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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,