From: 13 Date: 2006-05-02T02:33:47+09:00 Subject: Re: Generate unique filenames Hi, Tempfile creates an empty file (in /tmp by default) even if I don't write in it. It's not very good IMO. I rather choose some self made random number based solution. It would be great if there were some Tempfile class method like Tempfile.name(basename, tmpdir=Dir::tmpdir) which returns just a name without creating a file. Thanks to all who helped ! -- Martins On 5/1/06, Robert Klemme wrote: > 2006/5/1, 13 : > > Hi list, > > > > What is the best/easiest way to generate unique filenames ? Couln't > > find such method in Ruby :( > > You can use tempfile > http://ruby-doc.org/stdlib/libdoc/tempfile/rdoc/index.html > > Kind regards > > robert > > -- > Have a look: http://www.flickr.com/photos/fussel-foto/ > >