1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 06:21:14 +02:00

Move createTempFile to libutil

This commit is contained in:
Eelco Dolstra 2019-05-02 21:28:41 +02:00
parent dea18ff999
commit 8ec77614f6
3 changed files with 19 additions and 14 deletions

View file

@ -118,10 +118,6 @@ void deletePath(const Path & path);
void deletePath(const Path & path, unsigned long long & bytesFreed);
/* Create a temporary directory. */
Path createTempDir(const Path & tmpRoot = "", const Path & prefix = "nix",
bool includePid = true, bool useGlobalCounter = true, mode_t mode = 0755);
/* Return $HOME or the user's home directory from /etc/passwd. */
Path getHome();
@ -199,6 +195,14 @@ public:
};
/* Create a temporary directory. */
Path createTempDir(const Path & tmpRoot = "", const Path & prefix = "nix",
bool includePid = true, bool useGlobalCounter = true, mode_t mode = 0755);
/* Create a temporary file, returning a file handle and its path. */
std::pair<AutoCloseFD, Path> createTempFile(const Path & prefix = "nix");
class Pipe
{
public: