bes
Updated for version 3.17.4
|
Get a new temporary file. More...
#include <BESHandlerUtil.h>
Public Member Functions | |
int | get_fd () |
std::string | get_name () |
TemporaryFile () | |
Build a temporary file using a default template. More... | |
TemporaryFile (const std::string &path_template) | |
Get a new temporary file. More... | |
~TemporaryFile () | |
Free the temporary file. More... | |
Get a new temporary file that will be closed and deleted when the instance is deleted (i.e., goes out of scope). The intent of this class is to build temporary files that will be closed/deleted regardless of how the caller exits - regularly or via an exception.
Definition at line 45 of file BESHandlerUtil.h.
|
inline |
The temporary file will be in TMP_DIR (likely /tmp) and will have a name like 'opendapXXXXXX' where the Xs are numbers or letters.
Definition at line 57 of file BESHandlerUtil.h.
bes::TemporaryFile::TemporaryFile | ( | const std::string & | path_template | ) |
Get a new temporary file using the given template. The template must give the fully qualified path for the temporary file and must end in one or more Xs (but six are usually used) with no characters following.
path_template | Template passed to mkstemp() to build the temporary file pathname. |
Definition at line 52 of file BESHandlerUtil.cc.
|
inline |
Close the open descriptor and delete (unlink) the file name.
Definition at line 68 of file BESHandlerUtil.h.
|
inline |
Definition at line 74 of file BESHandlerUtil.h.
|
inline |
Definition at line 77 of file BESHandlerUtil.h.