RosettaCodeData/Task/Write-entire-file/Zkl/write-entire-file.zkl
2023-07-01 13:44:08 -04:00

6 lines
250 B
Text

// write returns bytes written, GC will close the file (eventually)
File("foo","wb").write("this is a test",1,2,3); //-->17
f:=File("bar",wb");
data.pump(f,g); // use g to process data as it is written to file
f.close(); // don't wait for GC