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

trait File for all file types

Required Methods§

source

fn readable(&self) -> bool

the file readable?

source

fn writable(&self) -> bool

the file writable?

source

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

read from the file to buf, return the number of bytes read

source

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

write to the file from buf, return the number of bytes written

Implementors§