#include <utilmm/system/system.hh>
Public Member Functions | |
| tempfile () | |
| ~tempfile () | |
| tempfile (std::string const &basename) | |
| FILE * | detach () |
| boost::filesystem::path | path () const |
| FILE * | handle () const |
Static Public Member Functions | |
| static FILE * | mkstemp (std::string const &base, boost::filesystem::path &path) |
| static FILE * | create () |
| 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.
| unix_error |
| 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
| FILE* utilmm::tempfile::detach | ( | ) |
Disassociates this object from the temporary file After a call to disassociate(), path() and fd() are no longer available
| 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.
| FILE* utilmm::tempfile::handle | ( | ) | const |
Get the underlying file handle
| static FILE* utilmm::tempfile::create | ( | ) | [static] |
Creates a temporary file
| unix_error | an error occured |
1.5.3