rCore-Tutorial-v3/os/src/fs/mod.rs
2021-02-19 00:38:21 +08:00

16 lines
375 B
Rust

mod pipe;
mod stdio;
mod inode;
use crate::mm::UserBuffer;
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;
}
pub use pipe::{Pipe, make_pipe};
pub use stdio::{Stdin, Stdout};
pub use inode::{OSInode, open_file, OpenFlags, list_apps};