1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
///@file
#include "lix/libutil/file-system.hh"
namespace nix {
/**
* Create a temporary directory.
*/
Path createTempDir(const std::optional<Path> & prefix = "nix", mode_t mode = 0755);
/**
* Create a temporary file, returning a file handle and its path.
*/
std::pair<AutoCloseFD, Path> createTempFile(const Path & prefix = "nix");
/**
* Return settings.tempDir, `TMPDIR`, or the default temporary directory if unset or empty.
*/
Path defaultTempDir();
}
|