useSandbox

Undocumented in source.
version(unittest_scriptlike_d)
enum useSandbox = q{ import std.stdio; auto oldCwd = std.file.getcwd(); auto sandboxDir = openSandbox(); scope(success) // Don't cleanup upon failure, so the remains can be manually insepcted. tryRmdirRecurse(sandboxDir); scope(failure) writeln("Sandbox directory: '", sandboxDir, "'"); scope(exit) std.file.chdir(oldCwd); };

Meta