string mkTmpDir()
{
import std.uuid, std.file, std.path;
string d = buildPath(tempDir, randomUUID.toString);
if (!d.exists)
{
mkdir(d);
return d;
}
elsereturnnull;
}
string s;
while (!s.length)
s = mkTmpDir;
The standard library doesn't provide a function for that. mkTmpDir generates a folder in the temp dir that takes a UUID as name. The temp dir is created when a non empty path is returned.