#include <utilmm/system/system.hh>
|
| static FILE * | mkstemp (std::string const &base, boost::filesystem::path &path) |
| |
| static FILE * | create () |
| |
A temporary file. It is created on construction and removed on destruction
| utilmm::tempfile::tempfile |
( |
| ) |
|
Create a temporary file. If you use this constructor, you cannot have the file name. You'll have to use only the file handle.
- Exceptions
-
| utilmm::tempfile::~tempfile |
( |
| ) |
|
Close and destroy the file
| utilmm::tempfile::tempfile |
( |
std::string const & |
basename | ) |
|
Create a temporary file using a base name The file name is available using path()
The tempfile() version is more secure. Use only this constructor if you need the file path
| static FILE* utilmm::tempfile::create |
( |
| ) |
|
|
static |
Creates a temporary file
- Returns
- the file descriptor to the open file
- Exceptions
-
| FILE* utilmm::tempfile::detach |
( |
| ) |
|
Disassociates this object from the temporary file After a call to disassociate(), path() and fd() are no longer available
- Returns
- the file path
| FILE* utilmm::tempfile::handle |
( |
| ) |
const |
Get the underlying file handle
| static FILE* utilmm::tempfile::mkstemp |
( |
std::string const & |
base, |
|
|
boost::filesystem::path & |
path |
|
) |
| |
|
static |
Wrapper around mkstemp Do not use this function to create a temporary file Use a tempfile object instead
| boost::filesystem::path utilmm::tempfile::path |
( |
| ) |
const |
Get the file path The file path is only available if the tempfile(std::string) constructor has been used.
- Returns
- the file path or an empty path if it is not available
The documentation for this class was generated from the following file: