filename = 'a_file.txt'File.file? filename # => falserequire 'fileutils'FileUtils.touch(filename)File.file? filename # => true