Tempfile can create temporary files for you : Tempfile « File Directory « Ruby






Tempfile can create temporary files for you


require 'tempfile'
f = Tempfile.new('myapp')
f.puts "Hello"
puts f.path
f.close

 








Related examples in the same category

1.Writing to a Temporary File
2.Create a temp file under
3.move a file with fileutils