Trait os::fs::File

source · []
pub trait File: Send + Sync {
    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

the file readable?

the file writable?

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

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

Implementors