More file IO!
Can now create, delete, and write to files.
This commit is contained in:
@@ -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")
|
||||
Reference in New Issue
Block a user