zypp::filesystem::TmpFile Class Reference

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

#include <TmpPath.h>

Inheritance diagram for zypp::filesystem::TmpFile:

zypp::filesystem::TmpPath List of all members.

Public Member Functions

 TmpFile (const Pathname &inParentDir_r=defaultLocation(), const std::string &prefix_r=defaultPrefix())
 Ctor.

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.

Definition at line 116 of file TmpPath.h.


Constructor & Destructor Documentation

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

Ctor.

Takes a Pathname.

Definition at line 171 of file TmpPath.cc.

References ERR, and zypp::filesystem::PathInfo::isDir().


Member Function Documentation

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

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

Definition at line 210 of file TmpPath.cc.


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:32 2006 for zypp by  doxygen 1.4.6