Lines Matching refs:name
240 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find()
247 match name { in find()
254 name => { in find()
260 return Ok(inode.children.get(name).ok_or(SystemError::ENOENT)?.clone()); in find()
339 pub fn add_dir(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in add_dir()
342 if guard.children.contains_key(name) { in add_dir()
346 match self.do_create_with_data(guard, name, FileType::Dir, 0o755 as u32, 0) { in add_dir()
359 pub fn add_file(&self, name: &str, file: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_file()
362 if this.children.contains_key(name) { in add_file()
366 this.children.insert(name.to_string(), file); in add_file()
386 pub fn remove(&self, name: &str) -> Result<(), SystemError> { in remove()
391 .remove(name) in remove()