Task

(Over)write a file so that it contains a string.



The reverse of Read entire file—for when you want to update or create a file which you would read in its entirety all at once.




      // 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