forked from AbleOS/ableos
31 lines
895 B
Plaintext
31 lines
895 B
Plaintext
acs := @use("acs.hb");
|
|
.{DiskID, FileID} := acs
|
|
|
|
// Paths without a node-disk component are to be treated as local files.
|
|
// file_path := "DID:/test\0";
|
|
Path := struct {
|
|
// DiskID holds the host id
|
|
disk_id: DiskID,
|
|
length: u8,
|
|
data: ^u8,
|
|
}
|
|
|
|
open := fn(file_path: Path): FileID {
|
|
}
|
|
close := fn(file_id: FileID): int {
|
|
}
|
|
// This reads in page_count of pages out of the file. If file_size is less than an exact multiple of pages do something.
|
|
// TODO: Figureout how to encode errors.
|
|
read_pages := fn(file_id: FileID, offset: int, page_count: int): void {
|
|
}
|
|
|
|
// This writes out page_count of pages out of the file.
|
|
write_pages := fn(file_id: FileID, offset: int, page_count: int): void {
|
|
}
|
|
|
|
// This reads out byte_count of bytes from the file.
|
|
read_bytes := fn(file_id: FileID, offset: int, byte_count: int): void {
|
|
}
|
|
|
|
write_bytes := fn(file_id: FileID, offset: int, byte_count: int): void {
|
|
} |