BuildCache
Public Member Functions | Private Attributes | List of all members
bcache::file::scoped_work_dir_t Class Reference

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
 

Detailed Description

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.


The documentation for this class was generated from the following files: