Nobuyoshi Nakada
10/24/2008 2:29:00 AM
Hi,
At Fri, 24 Oct 2008 05:24:20 +0900,
Kenneth McDonald wrote in [ruby-talk:318458]:
> I'd like to be able to obtain a temporary directory in the same way I
> can easily obtain a temporary file, but there doesn't seem to be a
> function for this. Currently, I'm creating a temp file, getting it's
> name, unlinking it, and then creating a dir with the same name. But
> this is ugly, and in theory subject to a race condition. Is there a
> better way of doing this?
Dir.mktmpdir is available in lib/tmpdir.rb since 1.8.7.
--
Nobu Nakada