vg
tools for working with variation graphs
|
Classes | |
struct | Handler |
Functions | |
std::string | create (const std::string &base) |
Create a temporary file starting with the given base name. More... | |
std::string | create () |
Create a temporary file. More... | |
void | remove (const std::string &filename) |
Remove a temporary file. More... | |
void | forget () |
Forget about all current temporary files and directories without deleting them. More... | |
void | set_dir (const std::string &new_temp_dir) |
Set a temp dir, overriding system defaults and environment variables. More... | |
std::string | get_dir () |
Get the current temp dir. More... | |
Temporary files. Create with create() and remove with remove(). All temporary files will be deleted when the program exits normally or with std::exit(). The files will be created in a directory determined from environment variables, though this can be overridden with set_dir(). The interface is thread-safe.
std::string xg::temp_file::create | ( | ) |
Create a temporary file.
std::string xg::temp_file::create | ( | const std::string & | base | ) |
Create a temporary file starting with the given base name.
void xg::temp_file::forget | ( | ) |
Forget about all current temporary files and directories without deleting them.
std::string xg::temp_file::get_dir | ( | ) |
Get the current temp dir.
void xg::temp_file::remove | ( | const std::string & | filename | ) |
Remove a temporary file.
void xg::temp_file::set_dir | ( | const std::string & | new_temp_dir | ) |
Set a temp dir, overriding system defaults and environment variables.