Struct kcore::chan::Dirent[][src]

pub struct Dirent {
    pub len: u64,
    pub mtime: u32,
    pub atime: u32,
}
Expand description

Machine-independent directory entry.

A directory entry represents information of a file(or directory file). Timestamps are measured in seconds since the epoch(Jan 1 00:00 1970 GMT).

Fields

len: u64

Length of file in bytes. Cannot changed by a wstat.

mtime: u32

Timestamp of last change of the content.

For a plain file, mtime is the time of the most recent create, open with truncation, or write; for a directory it is the time of the most recent remove, create, or wstat of a file in the directory.

It can be changed by the owner of the file or the group leader of the file’s current group.

atime: u32

Timestamp of last read of the content. Cannot changed by a wstat.

It’s also set whenever mtime is set. In addition, for a directory, it is set by an attach, walk, or create, all whether successful or not.

Auto Trait Implementations

impl RefUnwindSafe for Dirent

impl Send for Dirent

impl Sync for Dirent

impl Unpin for Dirent

impl UnwindSafe for Dirent

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Output = T

Should always be Self

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.