tempSubFilePath

Returns the path to a new (unique) temporary file under tempDir.

@safe @safe
string
tempSubFilePath
(
string prefix = null
,
string extension = null
)

Examples

import nxt.algorithm.searching : canFind, endsWith;
const prefix = "_xyz_";
const ext = "_ext_";
const path = tempSubFilePath(prefix, ext);
assert(path.canFind(prefix));
assert(path.endsWith(ext));

See Also

Meta