pub fn create(&mut self, path: &str) -> Result<usize> {
        if let Some(fd) = self.open(path)? {
            return Ok(fd);
        }

        self.files.insert(path.to_string(), RC::new(Vec::new()));
        Ok(self.add_file_descriptor(path))
    }
/// Open a file, or create it if it does not exist. Returns file descriptor.
Open a file, or create it if it does not exist. Returns file descriptor.
Open a file or create it if it does not exist . Returns file descriptor .
pub fn create(&mut self, path: &str) -> Result<usize> {
        if let Some(fd) = self.open(path)? {
            return Ok(fd);
        }
        self.files.insert(path.to_string(), RC::new(Vec::new()));
        Ok(self.add_file_descriptor(path))
    }
pub fn create ( & mut self , path : & str ) -> Result < usize > { if let Some ( fd ) = self . open ( path ) ? { return Ok ( fd ) ; } self . files . insert ( path . to_string ( ) , RC :: new ( Vec :: new ( ) ) ) ; Ok ( self . add_file_descriptor ( path ) ) }
Open a file, or create it if it does not exist.
Open a file or create it if it does not exist .
&mut self
path
&str