MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / open

Method open

crates/hyperqueue/src/common/serverdir.rs:32–40  ·  view source on GitHub ↗
(directory: &Path)

Source from the content-addressed store, hash-verified

30
31impl ServerDir {
32 pub fn open(directory: &Path) -> crate::Result<Self> {
33 let path = resolve_active_directory(directory);
34 if !path.is_dir() {
35 return error(format!("{path:?} is not a directory"));
36 }
37 Ok(Self {
38 path: absolute_path(path),
39 })
40 }
41
42 pub fn create(directory: &Path, record: &FullAccessRecord) -> crate::Result<ServerDir> {
43 let dir_path = create_new_server_dir(directory)?;

Callers 1

store_access_recordFunction · 0.45

Calls 3

resolve_active_directoryFunction · 0.85
errorFunction · 0.85
absolute_pathFunction · 0.85

Tested by

no test coverage detected