How to set the path of a Tempfile in ruby -


I have some files that I want to convert to temphile objects.

Is there a way to do something like this: Tempfile.new (path) ?

I am asking that I am trying to run an imaginary command which creates many files, a single template unfortunately does not collect the newly created files garbage ... < p> Thanks! Instead of just dumping into the new file in temphile, just overwrite it, thinking about just about anything

  tempfile = Tempfile.new ('foo') tempfile.close FileUtils.mv path, tempfile.path tempfile.open    

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -