MCPcopy Create free account
hub / github.com/PerroEngine/Perro / disk_path

Function disk_path

perro_source/api_modules/perro_modules/src/file.rs:131–140  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

129 "writes are restricted to `user://` or absolute paths",
130 ))
131}
132
133fn disk_path(path: &str) -> io::Result<PathBuf> {
134 validate_virtual_asset_path(path)?;
135 match perro_io::resolve_path(path) {
136 perro_io::ResolvedPath::Disk(path) => Ok(path),
137 _ => Err(io::Error::new(
138 io::ErrorKind::Unsupported,
139 "path does not resolve to disk",
140 )),
141 }
142}
143

Callers 2

read_dirFunction · 0.85
walk_dirFunction · 0.85

Calls 2

resolve_pathFunction · 0.50

Tested by

no test coverage detected