* 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).
+ * passed to the ctor is deleted (recursivly in case of directories). This
+ * behavior can be canged by calling \ref autoCleanup.
*
* Principally serves as base class, but standalone usable.
**/
/**
* Test whether the Pathname is valid (i.e. not empty. NOT whether
- * it realy denotes an existing file or directory).
+ * it really denotes an existing file or directory).
**/
- operator const void *const() const;
+ operator const void * () const;
/**
* @return The Pathname.
operator Pathname() const
{ return path(); }
+ /**
+ * Whether path is valid and deleted when the last reference drops.
+ */
+ bool autoCleanup() const;
+
+ /**
+ * Turn \ref autoCleanup on/off if path is valid.
+ */
+ void autoCleanup( bool yesno_r );
+
public:
/**
* @return The default directory where temporary
* 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.
**/
* 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.
**/