This is not the same thing as passing an empty string, because it avoids the `-` separator. Change-Id: I6a6a69646aa76953078a08c606e8f82c9ec03e8e
24 lines
480 B
C++
24 lines
480 B
C++
#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();
|
|
|
|
}
|