Type Alias axfs::fops::FileType

source ·
pub type FileType = VfsNodeType;
Expand description

Alias of [axfs_vfs::VfsNodeType].

Aliased Type§

enum FileType {
    Fifo = 1,
    CharDevice = 2,
    Dir = 4,
    BlockDevice = 6,
    File = 8,
    SymLink = 10,
    Socket = 12,
}

Variants§

§

Fifo = 1

FIFO (named pipe)

§

CharDevice = 2

Character device

§

Dir = 4

Directory

§

BlockDevice = 6

Block device

§

File = 8

Regular file

Symbolic link

§

Socket = 12

Socket

Implementations

§

impl VfsNodeType

pub const fn is_file(self) -> bool

Tests whether this node type represents a regular file.

pub const fn is_dir(self) -> bool

Tests whether this node type represents a directory.

Tests whether this node type represents a symbolic link.

pub const fn is_block_device(self) -> bool

Returns true if this node type is a block device.

pub const fn is_char_device(self) -> bool

Returns true if this node type is a char device.

pub const fn is_fifo(self) -> bool

Returns true if this node type is a fifo.

pub const fn is_socket(self) -> bool

Returns true if this node type is a socket.

pub const fn as_char(self) -> char

Returns a character representation of the node type.

For example, d for directory, - for regular file, etc.

Trait Implementations

§

impl Clone for VfsNodeType

§

fn clone(&self) -> VfsNodeType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for VfsNodeType

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl PartialEq for VfsNodeType

§

fn eq(&self, other: &VfsNodeType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for VfsNodeType

§

impl Eq for VfsNodeType

§

impl StructuralPartialEq for VfsNodeType