TmpDir Class Reference

Provide a new empty temporary directory and recursively delete it when no longer needed. More...

#include <TmpPath.h>

Inheritance diagram for TmpDir:

TmpPath List of all members.

Public Member Functions

 TmpDir (const Pathname &inParentDir_r=defaultLocation(), const std::string &prefix_r=defaultPrefix())

Static Public Member Functions

static const std::string & defaultPrefix ()

Detailed Description

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.

The directory where the temporary directory is to be created must exist. TmpDir provides the Pathname of the temporary directory , or an empty path in case of any error.


Constructor & Destructor Documentation

TmpDir::TmpDir const Pathname inParentDir_r = defaultLocation(),
const std::string &  prefix_r = defaultPrefix()
[explicit]
 

Ctor. Takes a Pathname.


Member Function Documentation

static const std::string& TmpDir::defaultPrefix  )  [static]
 

Returns:
The default prefix for temporary directories (TmpDir.)


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 15:51:35 2006 for liby2util by  doxygen 1.4.6