[#BloombergLP-bdls-TempDirectoryGuard] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::TempDirectoryGuard :relfileprefix: ../../ :mrdocs: This class implements a scoped temporary directory guard. == Synopsis Declared in `<bdls_tempdirectoryguard.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdls/TempDirectoryGuard/2constructor.adoc[`TempDirectoryGuard`] [.small]#[constructor]# | Create a temporary directory with the specified `prefix`. | xref:BloombergLP/bdls/TempDirectoryGuard/2destructor.adoc[`~TempDirectoryGuard`] [.small]#[destructor]# | Destroy this object and remove the temporary directory (recursively) created at construction. | xref:BloombergLP/bdls/TempDirectoryGuard/getTempDirName.adoc[`getTempDirName`] | Return a `const` reference to the name of the created temporary directory, or an empty string if the directory was released from management. | xref:BloombergLP/bdls/TempDirectoryGuard/release.adoc[`release`] | Release the temporary directory from guard management. | xref:BloombergLP/bdls/TempDirectoryGuard/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<TempDirectoryGuard, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#