feat(storage): add mkdir to FileSystem trait with stubs

This commit is contained in:
2026-10-18 23:06:26 +02:00
parent 25824a01fe
commit d85cb5b55d
8 changed files with 33 additions and 0 deletions

View File

@@ -82,6 +82,15 @@ impl<F: FileSystem> Server for StorageServer<F> {
None => StorageResponse::Error,
}
}
StorageRequest::Mkdir { path } => {
let buf = path.to_bytes();
let len = buf.iter().position(|&b| b == 0).unwrap_or(16);
if self.fs.mkdir(&buf[..len]) {
StorageResponse::Ok
} else {
StorageResponse::Error
}
}
}
}
}