What is the best way to create an empty file in Ruby?
Something similar to the Unix command, touch:
touch file.txt
FileUtils.touch looks like what it does, and mirrors* the touch command:
touch
require 'fileutils' FileUtils.touch('file.txt')
* Unlike touch(1) you can't update mtime or atime alone. It's also missing a few other nice options.