ScopedChdir

Helper struct to change the directory for the current scope.

Constructors

this
this(Path newDir)
Undocumented in source.
this
this(string newDir)

Convenience overload that takes a string.

Destructor

~this
~this()
Undocumented in source.

Members

Variables

prevDir
Path prevDir;
Undocumented in source.

Examples

auto orig = cwd();
with(ScopedChdir("..")) {
  assertNotEqual(orig, cwd());
}
assertEqual(orig, cwd());

Meta