move a file with fileutils : Tempfile « File Directory « Ruby






move a file with fileutils


require 'fileutils'
require 'tempfile'
out = Tempfile.new("myhome_tempfile", "/home/leonardr/temp/")
FileUtils.mv(out.path, "/home/leonardr/old_tempfile")

 








Related examples in the same category

1.Tempfile can create temporary files for you
2.Writing to a Temporary File
3.Create a temp file under