mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
added basic read, and an improved HAL
This commit is contained in:
@@ -11,10 +11,17 @@ import fileio;
|
||||
|
||||
// test open
|
||||
{
|
||||
var file = open("doesNotExist.txt", "r");
|
||||
|
||||
assert file["error"] == true, "error failed";
|
||||
assert file["size"] == 0, "size failed";
|
||||
var file = open("does", "r");
|
||||
|
||||
file.read(string);
|
||||
|
||||
// TODO:
|
||||
// file.write(12, ",", 12);
|
||||
// file.size();
|
||||
// file.isOpened();
|
||||
// file.error();
|
||||
// file.position();
|
||||
// file.mode();
|
||||
|
||||
// close(file);
|
||||
}
|
||||
Reference in New Issue
Block a user