Trait axfs::api::port::FileExt

source ·
pub trait FileExt: Read + Write + Seek + AsAny + Send + Sync {
    // Required methods
    fn readable(&self) -> bool;
    fn writable(&self) -> bool;
    fn executable(&self) -> bool;

    // Provided methods
    fn read_from_seek(
        &mut self,
        pos: SeekFrom,
        buf: &mut [u8]
    ) -> AxResult<usize> { ... }
    fn write_to_seek(&mut self, pos: SeekFrom, buf: &[u8]) -> AxResult<usize> { ... }
}
Expand description

用于给虚存空间进行懒分配

Required Methods§

source

fn readable(&self) -> bool

whether the file is readable

source

fn writable(&self) -> bool

whether the file is writable

source

fn executable(&self) -> bool

whether the file is executable

Provided Methods§

source

fn read_from_seek(&mut self, pos: SeekFrom, buf: &mut [u8]) -> AxResult<usize>

Read from position without changing cursor.

source

fn write_to_seek(&mut self, pos: SeekFrom, buf: &[u8]) -> AxResult<usize>

Write to position without changing cursor.

Implementors§