zypp::filesystem::TmpPath Class Reference

#include <TmpPath.h>

Inheritance diagram for zypp::filesystem::TmpPath:
[legend]

List of all members.

Public Member Functions

 TmpPath ()
 Default Ctor.
 TmpPath (const Pathname &tmpPath_r)
 Ctor.
virtual ~TmpPath ()
 Dtor.
 operator const void *const () const
 Test whether the Pathname is valid (i.e.
Pathname path () const
 
Returns:
The Pathname.

 operator Pathname () const
 Type conversion to Pathname.

Static Public Member Functions

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


Protected Attributes

RW_pointer< Impl_impl

Classes

class  Impl
 Clean or delete a directory on destruction. More...


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.

Definition at line 38 of file TmpPath.h.


Constructor & Destructor Documentation

zypp::filesystem::TmpPath::TmpPath (  ) 

Default Ctor.

An empty Pathname.

Definition at line 102 of file TmpPath.cc.

zypp::filesystem::TmpPath::TmpPath ( const Pathname tmpPath_r  )  [explicit]

Ctor.

Takes a Pathname.

Definition at line 112 of file TmpPath.cc.

zypp::filesystem::TmpPath::~TmpPath (  )  [virtual]

Dtor.

Definition at line 122 of file TmpPath.cc.


Member Function Documentation

zypp::filesystem::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).

Definition at line 132 of file TmpPath.cc.

References _impl.

Pathname zypp::filesystem::TmpPath::path (  )  const

Returns:
The Pathname.

Definition at line 143 of file TmpPath.cc.

References _impl.

Referenced by zypp::media::MediaSMB::attachTo(), zypp::KeyRing::Impl::exportKey(), zypp::target::rpm::RpmDb::exportTrustedKeysInZyppKeyRing(), zypp::KeyRing::Impl::generalKeyRing(), operator Pathname(), zypp::PublicKey::Impl::path(), zypp::target::rpm::RpmDb::pubkeys(), zypp::PublicKey::Impl::readFromFile(), zypp::KeyRing::Impl::readSignatureKeyId(), zypp::RepoManager::refreshMetadata(), zypp::zypp_detail::ZYppImpl::tmpPath(), and zypp::KeyRing::Impl::trustedKeyRing().

zypp::filesystem::TmpPath::operator Pathname (  )  const [inline]

Type conversion to Pathname.

Definition at line 73 of file TmpPath.h.

References path().

const Pathname & zypp::filesystem::TmpPath::defaultLocation (  )  [static]

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

Definition at line 154 of file TmpPath.cc.

Referenced by zypp::media::MediaHandler::createAttachPoint(), zypp::repo::doProvideScript(), and zypp::repo::doProvideSrcPackage().


Member Data Documentation

RW_pointer<Impl> zypp::filesystem::TmpPath::_impl [protected]

Definition at line 85 of file TmpPath.h.

Referenced by operator const void *const(), path(), zypp::filesystem::TmpDir::TmpDir(), and zypp::filesystem::TmpFile::TmpFile().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:20 2007 for libzypp by  doxygen 1.5.3