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

Function validate_write_path

perro_source/api_modules/perro_modules/src/zip.rs:75–87  ·  view source on GitHub ↗
(path: &str)

Source from the content-addressed store, hash-verified

73 )),
74 }
75}
76
77fn writable_disk_path(path: &str) -> io::Result<PathBuf> {
78 validate_write_path(path)?;
79 match perro_io::resolve_path(path) {
80 perro_io::ResolvedPath::Disk(path) => Ok(path),
81 _ => Err(io::Error::new(
82 io::ErrorKind::Unsupported,
83 "path does not resolve to disk",
84 )),
85 }
86}
87
88fn writable_file_path(path: &str) -> io::Result<PathBuf> {
89 if path.starts_with("user://") {
90 return writable_disk_path(path);

Callers 1

writable_disk_pathFunction · 0.70

Calls 1

Tested by

no test coverage detected