summaryrefslogtreecommitdiff
path: root/nix/libutil/util.hh
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2024-03-31 20:46:45 -0400
committerJohn Kehayias <john.kehayias@protonmail.com>2024-03-31 20:46:45 -0400
commit155f23a52e626e8ac60f818937d5bb1a3ebe3184 (patch)
treea19317812471db31ae2a97844d6cf74e45057466 /nix/libutil/util.hh
parentd9dee5ea2f564fa6979ae552fd9bd5ac22f86ecc (diff)
parent1cba1f8ce6f84c4737650401c0eb0473a45f9ff7 (diff)
Merge branch 'master' into mesa-updates
Change-Id: I4cd94a58b62d8c3987e4a60c76b37894ad851e35
Diffstat (limited to 'nix/libutil/util.hh')
-rw-r--r--nix/libutil/util.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh
index 880b0e93b2..377aac0684 100644
--- a/nix/libutil/util.hh
+++ b/nix/libutil/util.hh
@@ -102,6 +102,13 @@ void deletePath(const Path & path);
void deletePath(const Path & path, unsigned long long & bytesFreed,
size_t linkThreshold = 1);
+/* Copy SOURCE to DESTINATION, recursively, preserving ownership. Throw if
+ SOURCE contains a file that is not a regular file, symlink, or directory.
+ When DELETESOURCE is true, delete source files once they have been
+ copied. */
+void copyFileRecursively(const Path &source, const Path &destination,
+ bool deleteSource = false);
+
/* Create a temporary directory. */
Path createTempDir(const Path & tmpRoot = "", const Path & prefix = "nix",
bool includePid = true, bool useGlobalCounter = true, mode_t mode = 0755);