LLVM 20.0.0git
|
A RAII object that creates a temporary directory upon initialization and removes it upon destruction. More...
#include "llvm/Testing/Support/SupportHelpers.h"
Public Member Functions | |
TempDir (StringRef Name, bool Unique=false) | |
Creates a managed temporary directory. | |
~TempDir () | |
TempDir (const TempDir &)=delete | |
TempDir & | operator= (const TempDir &)=delete |
TempDir (TempDir &&)=default | |
TempDir & | operator= (TempDir &&)=default |
StringRef | path () const |
The path to the temporary directory. | |
const char * | c_str () |
The null-terminated C string pointing to the path. | |
SmallString< 128 > | path (StringRef component) const |
Creates a new path by appending the argument to the path of the managed directory using the native path separator. | |
A RAII object that creates a temporary directory upon initialization and removes it upon destruction.
Definition at line 113 of file SupportHelpers.h.
Creates a managed temporary directory.
Name | The name of the directory to create. |
Unique | If true, the directory will be created using llvm::sys::fs::createUniqueDirectory. |
Definition at line 122 of file SupportHelpers.h.
References llvm::sys::fs::create_directory(), llvm::sys::fs::createUniqueDirectory(), Name, and llvm::sys::fs::real_path().
|
inline |
Definition at line 140 of file SupportHelpers.h.
References llvm::sys::fs::remove_directories().
|
default |
The null-terminated C string pointing to the path.
Definition at line 156 of file SupportHelpers.h.
|
inline |
The path to the temporary directory.
Definition at line 153 of file SupportHelpers.h.
|
inline |
Creates a new path by appending the argument to the path of the managed directory using the native path separator.
Definition at line 160 of file SupportHelpers.h.
References llvm::sys::path::append(), and llvm::sys::path::native.