proxygen
|
#include <TestUtil.h>
Public Types | |
enum | Scope { Scope::PERMANENT, Scope::DELETE_ON_DESTRUCTION } |
Public Member Functions | |
TemporaryDirectory (StringPiece namePrefix=StringPiece(), fs::path dir=fs::path(), Scope scope=Scope::DELETE_ON_DESTRUCTION) | |
~TemporaryDirectory () | |
TemporaryDirectory (TemporaryDirectory &&)=default | |
TemporaryDirectory & | operator= (TemporaryDirectory &&)=default |
const fs::path & | path () const |
Private Attributes | |
Scope | scope_ |
std::unique_ptr< fs::path > | path_ |
Temporary directory.
By default, the temporary directory is created in a system-specific location (the value of the TMPDIR environment variable, or /tmp), but you can override that with a non-empty directory passed to the constructor.
By default, the directory is recursively deleted when the TemporaryDirectory object is destroyed, but that can be overridden with an argument to the constructor.
Definition at line 100 of file TestUtil.h.
|
strong |
Enumerator | |
---|---|
PERMANENT | |
DELETE_ON_DESTRUCTION |
Definition at line 102 of file TestUtil.h.
|
explicit |
folly::test::TemporaryDirectory::~TemporaryDirectory | ( | ) |
Definition at line 123 of file TestUtil.cpp.
References DELETE_ON_DESTRUCTION, path(), path_, scope_, and folly::WARNING.
|
default |
|
default |
|
inline |
Definition at line 116 of file TestUtil.h.
References folly::test::TemporaryFile::path_.
Referenced by folly::test::ChangeToTempDir::ChangeToTempDir(), expectTempdirExists(), TemporaryDirectory(), folly::test::TEST(), TEST(), testTemporaryDirectory(), and ~TemporaryDirectory().
|
private |
Definition at line 122 of file TestUtil.h.
Referenced by ~TemporaryDirectory().
|
private |
Definition at line 121 of file TestUtil.h.
Referenced by ~TemporaryDirectory().