ScopedChdir
struct ScopedChdir {
Path prevDir;
}
- this
this(string newDir)
Convenience overload that takes a string.
A destructor is present on this object, but not explicitly documented in the source.
1 auto orig = cwd();
2 with(ScopedChdir("..")) {
3 assertNotEqual(orig, cwd());
4 }
5 assertEqual(orig, cwd());
Helper struct to change the directory for the current scope.