D-Programming-Language/phobos — pull request #691 by jmdavis (2012-07-15 01:20:07+00:00)
Title: Added tempFile to std.file.

It generates a random file name in the directory that you tell it to,
defaulting to the result of tempDir.

I'm planning on adding a `tempFile` function to `std.stdio.File` as well which uses this (and replaces `tempdir`, which does _not_ give its `File` a filename and also deletes the file when the `File` is closed - both of which are potentially problems), but I ran into Windows header problems, since in order to implement it correctly (without race conditions), you have to use `open` and `fdopen`, which we don't currently have declarations for on Windows, and I don't want to deal with that right now, so I'm tabling it for the moment.

But this function is still useful, so I'm creating this pull request.