Trait os::fs::File

source ·
pub trait File: Send + Sync {
    // Required methods
    fn readable(&self) -> bool;
    fn writable(&self) -> bool;
    fn read(&self, buf: UserBuffer) -> usize;
    fn write(&self, buf: UserBuffer) -> usize;
}
Expand description

File trait

Required Methods§

source

fn readable(&self) -> bool

If readable

source

fn writable(&self) -> bool

If writable

source

fn read(&self, buf: UserBuffer) -> usize

Read file to UserBuffer

source

fn write(&self, buf: UserBuffer) -> usize

Write UserBuffer to file

Implementors§