pub fn new(base_path: Option<PathBuf>) -> Result<FileSystem> {
        let mut fs = FileSystem {
            file_descriptors: HashMap::new(),
            files: HashMap::new(),
            base_path,
            next_fd: 0,
        };

        fs.create("/stdin")?;
        fs.create("/stdout")?;
        fs.create("/stderr")?;

        Ok(fs)
    }
/// Create a new model of the Linux Filesystem.
///
/// The filedescriptors 0, 1, and 2 are initialized to files named:
/// `/stdin`, `/stdout`, and `/stderr` respectively.
///
/// If given an optional path, then this path will be used to look for files
/// when opening files.
Create a new model of the Linux Filesystem.

If given an optional path, then this path will be used to look for files
when opening files.
Create a new model of the Linux Filesystem . If given an optional path then this path will be used to look for files when opening files .
pub fn new(base_path: Option<PathBuf>) -> Result<FileSystem> {
        let mut fs = FileSystem {
            file_descriptors: HashMap::new(),
            files: HashMap::new(),
            base_path,
            next_fd: 0,
        };
        fs.create("/stdin")?;
        fs.create("/stdout")?;
        fs.create("/stderr")?;
        Ok(fs)
    }
pub fn new ( base_path : Option < PathBuf > ) -> Result < FileSystem > { let mut fs = FileSystem { file_descriptors : HashMap :: new ( ) , files : HashMap :: new ( ) , base_path , next_fd : 0 , } ; fs . create ( " " ) ? ; fs . create ( " " ) ? ; fs . create ( " " ) ? ; Ok ( fs ) }
Create a new model of the Linux Filesystem.
Create a new model of the Linux Filesystem .
base_path
Option<PathBuf>