More file IO!

Can now create, delete, and write to files.
This commit is contained in:
Bob Nystrom
2016-02-20 09:23:42 -08:00
parent bec5181bdb
commit 8e90e3577b
21 changed files with 463 additions and 52 deletions
+12
View File
@@ -0,0 +1,12 @@
import "io" for File
File.create("file.temp") {|file|
// Appends.
file.writeBytes("one")
file.writeBytes("two")
file.writeBytes("three")
}
System.print(File.read("file.temp")) // expect: onetwothree
File.delete("file.temp")