Struct obnth::Metadata[][src]

pub struct Metadata { /* fields omitted */ }

Represents metadata information about a file. Similar to std::fs::Metadata.

Implementations

impl Metadata[src]

pub fn file_type(&self) -> FileType[src]

Get the type of this file.

pub fn stat(&self) -> &stat[src]

Returns a reference to the underlying libc::stat structure.

pub fn is_file(&self) -> bool[src]

Returns true if this Metadata object refers to a regular file; false if it does not.

pub fn is_dir(&self) -> bool[src]

Returns true if this Metadata object refers to a regular directory; false if it does not.

pub fn permissions(&self) -> Permissions[src]

Get the permissions of this file.

pub fn len(&self) -> u64[src]

Get the size of this file.

pub fn dev(&self) -> u64[src]

Return the ID of the device containing the file.

pub fn ino(&self) -> u64[src]

Return the file's inode number

Trait Implementations

impl Clone for Metadata[src]

impl Copy for Metadata[src]

impl Debug for Metadata[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.