softwarecontainer
0.18.0-739e8d7 2017-05-04
|
The CreateDir class is responsible for creating new directories and removing them when it is necessary. More...
#include <createdir.h>
Public Member Functions | |
bool | createDirectory (const std::string path) |
createDirectory creates a directory according to given path. More... | |
std::string | createTempDirectoryFromTemplate (std::string templatePath) |
createTempDirectoryFromTemplate creates a uniquely named directory according to templatePath. More... | |
The CreateDir class is responsible for creating new directories and removing them when it is necessary.
This class is created as a helper to FileToolkitWithUndo class. It adds value to FileToolkitWithUndo class by creating rollback option on failures.
Definition at line 33 of file createdir.h.
bool softwarecontainer::CreateDir::createDirectory | ( | const std::string | path | ) |
createDirectory creates a directory according to given path.
The directory will be removed when the object is destroyed.
path | Path of directory to be created |
Definition at line 59 of file createdir.cpp.
References softwarecontainer::isDirectory().
std::string softwarecontainer::CreateDir::createTempDirectoryFromTemplate | ( | std::string | templatePath | ) |
createTempDirectoryFromTemplate creates a uniquely named directory according to templatePath.
templatePath | is used to create the path of the temporary directory. The last six characters of template must be XXXXXX and these are replaced with a string that makes the directory name unique. |
SoftwareContainerError | if template path is not appropriate. |
Definition at line 81 of file createdir.cpp.