Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
string mkTmpDir()
{
import std.uuid, std.file, std.path;
string d = buildPath(tempDir, randomUUID.toString);
if (!d.exists)
{
mkdir(d);
return d;
}
else return null;
}
string s;
while (!s.length)
s = mkTmpDir;
const tempDir = await Deno.makeTempDir();
function createTempDir(): ?string
{
$path = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . mt_rand() . microtime(true);
if (mkdir($path)) {
return $path;
}
return null;
}