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

TmpPath Class Reference

Automaticaly deletes files or directories when no longer needed. More...

#include <TmpPath.h>

Inheritance diagram for TmpPath:

TmpDir TmpFile List of all members.

Public Member Functions

 TmpPath ()
 TmpPath (const Pathname &tmpPath_r)
virtual ~TmpPath ()
 operator const void *const () const
Pathname path () const
 operator Pathname () const

Static Public Member Functions

static const PathnamedefaultLocation ()

Protected Attributes

VarPtr< Impl > _impl

Detailed Description

Automaticaly deletes files or directories when no longer needed.

TmpPath is constructed from a Pathname. Multiple TmpPath instances created by copy and assign, share the same reference counted internal repesentation.

When the last reference drops any file or directory located at the path passed to the ctor is deleted (recursivly in case of directories).

Principally serves as base class, but standalone usable.


Constructor & Destructor Documentation

TmpPath::TmpPath  ) 
 

Default Ctor. An empty Pathname.

TmpPath::TmpPath const Pathname tmpPath_r  )  [explicit]
 

Ctor. Takes a Pathname.

virtual TmpPath::~TmpPath  )  [virtual]
 

Dtor.


Member Function Documentation

static const Pathname& TmpPath::defaultLocation  )  [static]
 

Returns:
The default directory where temporary files should be are created (/var/tmp).

TmpPath::operator const void *const  )  const
 

Test whether the Pathname is valid (i.e. not empty. NOT whether it realy denotes an existing file or directory).

TmpPath::operator Pathname  )  const [inline]
 

Type conversion to Pathname.

Pathname TmpPath::path  )  const
 

Returns:
The Pathname.


Member Data Documentation

VarPtr<Impl> TmpPath::_impl [protected]
 


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