MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / get_file

Method get_file

ramdisk/src/main.rs:84–90  ·  view source on GitHub ↗

Lookup and return shared reference to a file

(&self, name: &str)

Source from the content-addressed store, hash-verified

82 }
83 /// Lookup and return shared reference to a file
84 fn get_file(&self, name: &str) -> Result<Arc<RwLock<dyn FileLike + Send + Sync>>, syscalls::SyscallError> {
85 if self.files.contains_key(name) {
86 Ok(self.files[name].clone())
87 } else {
88 Err(syscalls::SYSCALL_ERROR_NOTFOUND)
89 }
90 }
91
92 fn query(&self) -> String {
93 // Make a list of files separated with commas.

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.80

Tested by

no test coverage detected