From: 13 Date: 2006-05-02T03:04:15+09:00 Subject: Re: Generate unique filenames Steve, you're right ! If I will need to be so bulletproof then I will create a list of filenames that I have created and delete them sometime. Thanks, for pointing me to this problem. -- Martins On 5/1/06, Stephen Waits wrote: > 13 wrote: > > > > 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. > > You're entitled to your opinion.. but.. > > The way that you're asking for it to work is badly broken, because in > that case, you may attempt to use the filename and find that it's no > longer unique. > > --Steve > > >