libzypp
10.5.0
|
Provide a new empty temporary directory and recursively delete it when no longer needed. More...
#include <TmpPath.h>
Public Member Functions | |
TmpDir (const Pathname &inParentDir_r=defaultLocation(), const std::string &prefix_r=defaultPrefix()) | |
Ctor. | |
Static Public Member Functions | |
static TmpDir | makeSibling (const Pathname &sibling_r) |
Provide a new empty temporary directory as sibling. | |
static const std::string & | defaultPrefix () |
Provide a new empty temporary directory and recursively delete it when no longer needed.
The temporary directory is per default created in '/var/tmp' and named 'TmpDir.XXXXXX', with XXXXXX replaced by a string which makes the name unique. Different location and file prefix may be passed to the ctor. TmpDir is created with mode 0700.
TmpDir provides the Pathname of the temporary directory , or an empty path in case of any error.
zypp::filesystem::TmpDir::TmpDir | ( | const Pathname & | inParentDir_r = defaultLocation() , |
const std::string & | prefix_r = defaultPrefix() |
||
) | [explicit] |
Provide a new empty temporary directory as sibling.
TmpDir s = makeSibling( "/var/lib/mydir" ); // returns: /var/lib/mydir.XXXXXX
If sibling_r
exists, sibling is created using the same mode.
Definition at line 290 of file TmpPath.cc.
const std::string & zypp::filesystem::TmpDir::defaultPrefix | ( | ) | [static] |
Definition at line 308 of file TmpPath.cc.