Immediately sends the contents of any internal write buffers for this
File object to disk. This method ensures that any short parts of previously written data are written to disk right away, ensuring that the data is actually on disk if the script terminates abruptly. Avoid calling this method too often. For example, do not call it between successive
File.write() calls because you’ll slow down performance without getting much benefit.
var f = File("/Users/garry/Desktop/test.txt") f.flush # Nothing.