Struct os::fs::Dirent

source · []
#[repr(C)]
pub struct Dirent { pub d_ino: usize, pub d_off: isize, pub d_reclen: u16, pub d_type: u8, pub d_name: [u8; 128], }
Expand description

Native Linux directory entry structure.

Note

In theory, the d_name may NOT have a fixed size and d_name may be arbitrarily lone.

Fields

d_ino: usize

Inode number

d_off: isize

Offset to next linux_dirent

d_reclen: u16

Length of this linux_dirent

d_type: u8

Type of the file

d_name: [u8; 128]

The Filename (null-terminated)

Note

We use fix-sized d_name array.

Implementations

Offset to next linux_dirent

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.