     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17

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