ROSE 0.11.145.147
|
Creates a temporary file.
Creates a file with the specified name (or a pseudo-random name in the system temp directory), and make sure it gets deleted from the file system upon object destruction.
Definition at line 25 of file Sawyer/FileSystem.h.
#include <Sawyer/FileSystem.h>
Public Member Functions | |
TemporaryFile () | |
Create a temporary file in the system temp directory. | |
TemporaryFile (const boost::filesystem::path &name) | |
Create a temporary file with the specified name. | |
~TemporaryFile () | |
Unlink the temporary file from the filesystem. | |
const boost::filesystem::path & | name () const |
Path of temporary file. | |
std::ofstream & | stream () |
Output stream for temporary file. | |
bool | keep () const |
Property: Keep file instead of deleting it. | |
void | keep (bool b) |
Property: Keep file instead of deleting it. | |
|
inline |
Create a temporary file in the system temp directory.
Definition at line 32 of file Sawyer/FileSystem.h.
|
inlineexplicit |
Create a temporary file with the specified name.
Definition at line 38 of file Sawyer/FileSystem.h.
|
inline |
Unlink the temporary file from the filesystem.
This also closes the stream if it's open.
Definition at line 46 of file Sawyer/FileSystem.h.
|
inline |
Path of temporary file.
Definition at line 53 of file Sawyer/FileSystem.h.
|
inline |
Output stream for temporary file.
Definition at line 56 of file Sawyer/FileSystem.h.
|
inline |
Property: Keep file instead of deleting it.
Definition at line 61 of file Sawyer/FileSystem.h.
|
inline |
Property: Keep file instead of deleting it.
Definition at line 62 of file Sawyer/FileSystem.h.