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

@@ -46,6 +46,7 @@ pub enum StorageRequest {
Create { path: PackedPath },
Delete { path: PackedPath },
FileSize { handle: FileHandle },
Mkdir { path: PackedPath },
}
#[derive(Debug, PartialEq)]
@@ -71,6 +72,7 @@ impl Encode for StorageRequest {
StorageRequest::Create { path } => [5, path.word0(), path.word1(), 0],
StorageRequest::Delete { path } => [6, path.word0(), path.word1(), 0],
StorageRequest::FileSize { handle } => [7, handle.raw() as usize, 0, 0],
StorageRequest::Mkdir { path } => [8, path.word0(), path.word1(), 0],
}
}
}
@@ -86,6 +88,7 @@ impl Decode for StorageRequest {
5 => Some(StorageRequest::Create { path: PackedPath::from_words(words[1], words[2]) }),
6 => Some(StorageRequest::Delete { path: PackedPath::from_words(words[1], words[2]) }),
7 => Some(StorageRequest::FileSize { handle: FileHandle::new(words[1] as u16) }),
8 => Some(StorageRequest::Mkdir { path: PackedPath::from_words(words[1], words[2]) }),
_ => None,
}
}