Generates a uniquely named temporary directory from template.
The last six characters of template must be XXXXXX and these are replaced with a string that makes the directory name unique. The directory is then created with permissions 0700.
The generated directory name.
import std.algorithm : startsWith; import std.file : isDir, rmdir; string tempDir = mkdtemp(".unittest-XXXXXX"); try { assert(isDir(tempDir)); assert(tempDir.startsWith(".unittest-")); } finally { rmdir(tempDir); }
See Implementation
Generates a uniquely named temporary directory from template.
The last six characters of template must be XXXXXX and these are replaced with a string that makes the directory name unique. The directory is then created with permissions 0700.