1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/sysdata/libraries/stn/src/file_io.hb

27 lines
804 B
Plaintext
Raw Normal View History

2024-09-17 08:01:16 -05:00
// TODO: This is a bad path struct and should be better thoughtout.
Path := struct {length: u8, data: ^u8}
FileID := struct {
host_id: int,
id: int,
}
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 {
}