mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-27 03:43:36 +04:00
16 lines
375 B
Rust
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}; |