Temporary file.
Synopsis
Declared in <folly/testing/TestUtil.h>
class TemporaryFile;
Description
By default, the file is created in a system‐specific location (the value of the TMPDIR environment variable, or /tmp), but you can override that with a different (non‐empty) directory passed to the constructor.
By default, the file is closed and deleted when the TemporaryFile object is destroyed, but both these behaviors can be overridden with arguments to the constructor.
Enums
Name |
Description |
Controls when the temporary file is unlinked. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroys the object, closing and unlinking the file per the chosen scope. |
Move‐assigns from another instance. |
|
Closes the underlying file descriptor. |
|
Returns the underlying file descriptor. |
|
Returns the path of the temporary file. |
|
Closes and unlinks the file, releasing its resources. |
Created with MrDocs