BloombergLP::bdls::TempDirectoryGuard

This class implements a scoped temporary directory guard.

Synopsis

Declared in <bdls_tempdirectoryguard.h>

class TempDirectoryGuard;

Description

The guard tries to create a temporary directory in the system-wide temp directory and falls back to the current directory.

Member Functions

NameDescription
TempDirectoryGuard [constructor]Create a temporary directory with the specified prefix.
~TempDirectoryGuard [destructor]Destroy this object and remove the temporary directory (recursively) created at construction.
getTempDirName Return a const reference to the name of the created temporary directory, or an empty string if the directory was released from management.
release Release the temporary directory from guard management.
operator BloombergLP::bslmf::NestedTraitDeclaration<TempDirectoryGuard, UsesBslmaAllocator> Declare that this type uses a bslma allocator.