Reading files!

- File.close()
- File.open()
- File.read()
- file.readBytes()

And a few other little methods. Still lots more work to do, but it's a
start.
This commit is contained in:
Bob Nystrom
2015-09-30 21:13:36 -07:00
parent bacbd85543
commit b7ed774da3
32 changed files with 475 additions and 44 deletions
+8
View File
@@ -0,0 +1,8 @@
import "io" for File
var text = File.read("test/io/file/file.txt")
System.print(text) // expect: this is a text file
System.print(text.count) // expect: 19
// TODO: A file containing line endings.
// TODO: A file containing null bytes.