|
Tkrzw
|
Temporary directory whose life duration is bound with the object. More...
#include <tkrzw_file_util.h>
Public Member Functions | |
| TemporaryDirectory (bool cleanup=true, const std::string &prefix="", const std::string &base_dir="") | |
| Constructor. More... | |
| ~TemporaryDirectory () | |
| Destructor. More... | |
| Status | CreationStatus () const |
| Checks whether the creation of the directory is successful. More... | |
| std::string | Path () const |
| Gets the path of the directory. More... | |
| std::string | MakeUniquePath (const std::string &prefix="", const std::string &suffix="") const |
| Makes a unique path in the temporary directory. More... | |
| Status | CleanUp () const |
| Removes all contents of the temporary directory. More... | |
Temporary directory whose life duration is bound with the object.
| tkrzw::TemporaryDirectory::TemporaryDirectory | ( | bool | cleanup = true, |
| const std::string & | prefix = "", |
||
| const std::string & | base_dir = "" |
||
| ) |
Constructor.
| cleanup | If true, the temporary directory is removed when the object dies. |
| prefix | A prefix given to the directory. If empty, it is not used. |
| base_dir | A base directory to contain the directory. If empty, the standard temporary directory of the sytem is used. |
| tkrzw::TemporaryDirectory::~TemporaryDirectory | ( | ) |
Destructor.
| Status tkrzw::TemporaryDirectory::CreationStatus | ( | ) | const |
Checks whether the creation of the directory is successful.
| std::string tkrzw::TemporaryDirectory::Path | ( | ) | const |
Gets the path of the directory.
| std::string tkrzw::TemporaryDirectory::MakeUniquePath | ( | const std::string & | prefix = "", |
| const std::string & | suffix = "" |
||
| ) | const |
Makes a unique path in the temporary directory.
| Status tkrzw::TemporaryDirectory::CleanUp | ( | ) | const |
Removes all contents of the temporary directory.