|
BuildCache
|
A helper class for temporarily changing the current working dir (CWD). More...
#include <file_utils.hpp>
Public Member Functions | |
| scoped_work_dir_t (const std::string &new_work_dir) | |
Private Attributes | |
| std::string | m_old_work_dir |
A helper class for temporarily changing the current working dir (CWD).
When the scoped_work_dir_t object is created, the current working directory is changed to the given path. When the object goes out of scope, the current working directory is changed back to what it was before the object was created.
If no working directory is specified (if new_work_dir is an empty string), the working directory is not changed.
1.8.17