summaryrefslogtreecommitdiff
path: root/nix/libutil/util.hh
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-03-16 10:19:30 +0000
committerChristopher Baines <mail@cbaines.net>2024-03-16 10:19:30 +0000
commit618cae45dc2a45079e910e72be2062c58590f262 (patch)
tree45536e51dafe3d34bd2cf55ee252e3345bf08803 /nix/libutil/util.hh
parent2ee54513196bad8e663e78ac695b6ffa0da49051 (diff)
parent00bf07ecccee86da4ced281bd28948c96db284e6 (diff)
Merge remote-tracking branch 'savannah/master' into gnome-team
Change-Id: I775274c2693536e2efa36c9abca4c54c5c458e26
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);