open("output", "w") { |f| f << "Here's some output.\n" } stat = File.stat("output") stat.mtime stat.atime sleep(2) open("output", "a") { |f| f << "Here's some more output.\n" } stat = File.stat("output") stat.mtime stat.atime sleep(2) open("output") { |f| contents = f.read } stat = File.stat("output") stat.mtime stat.atime