![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
A RAII helper to temporarily change the working directory of the process. More...
Public Member Functions | |
| scoped_change_directory (null_terminated_string_view const new_path) | |
| Save the working directory and set it to the new path. | |
| scoped_change_directory (scoped_change_directory &&)=delete | |
| Not movable. | |
| scoped_change_directory (scoped_change_directory const &)=delete | |
| Not copyable. | |
| ~scoped_change_directory () | |
| Restore the working directory to the value saved on construction if possible. | |
| auto | operator= (scoped_change_directory &&) -> scoped_change_directory &=delete |
| Not movable. | |
| auto | operator= (scoped_change_directory const &) -> scoped_change_directory &=delete |
| Not copyable. | |
A RAII helper to temporarily change the working directory of the process.
The working directory is saved on construction, before being set to the new path. It is then restored to the old value on destruction.
|
explicit |
Save the working directory and set it to the new path.
| new_path | The new working directory |
| std::system_error | if an error occurs setting or retrieving the working directory |
| arene::base::filesystem::scoped_change_directory::~scoped_change_directory | ( | ) |
Restore the working directory to the value saved on construction if possible.
Restore the old directory.
|
delete |
Not copyable.
|
delete |
Not movable.
|
delete |
Not movable.
|
delete |
Not copyable.