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: 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.new (path) ?
tempfile = Tempfile.new ('foo') tempfile.close FileUtils.mv path, tempfile.path tempfile.open
Comments
Post a Comment