25#ifndef DAP_TEMPFILE_H_
26#define DAP_TEMPFILE_H_
49 static struct sigaction cached_sigpipe_handler;
50 mutable std::recursive_mutex d_tf_lock_mutex;
52 static std::once_flag d_init_once;
55 static std::unique_ptr< std::map<std::string, int> > open_files;
62 static void mk_temp_dir(
const std::string &dir_name =
"/tmp/hyrax_tmp") ;
64 friend class TemporaryFileTest;
71 explicit TempFile(
bool keep_temps =
false);
74 std::string
create(
const std::string &dir_name =
"/tmp/hyrax_tmp",
const std::string &path_template =
"opendap");
80 std::string
get_name()
const {
return d_fname; }
Get a new temporary file.
~TempFile()
Free the temporary file.
std::string get_name() const
static void sigpipe_handler(int signal)
std::string create(const std::string &dir_name="/tmp/hyrax_tmp", const std::string &path_template="opendap")
Create a new temporary file.