Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

TmpFile Class Reference

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

#include <TmpPath.h>

Inheritance diagram for TmpFile:

TmpPath List of all members.

Public Member Functions

 TmpFile (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 file and delete it when no longer needed.

The temporary file is per default created in '/var/tmp' and named ' TmpFile.XXXXXX', with XXXXXX replaced by a string which makes the name unique. Different location and file prefix may be passed to the ctor. TmpFile is created with mode 0600.

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


Constructor & Destructor Documentation

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

Ctor. Takes a Pathname.


Member Function Documentation

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

Returns:
The default prefix for temporary files (TmpFile.)


The documentation for this class was generated from the following file:
Generated on Fri Feb 24 00:30:02 2006 for liby2util by  doxygen 1.4.4