Implement an RAII wrapper around chdir().
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
This PR adds a new utility class, ChdirWrapper
, to the library. It is an RAII-managed wrapper around the linux chdir()
function that reverts the current directory change when it goes out of scope.
Validation
Just run the unit test suites as usual. I have added unit tests that address this new class.