summaryrefslogtreecommitdiff
path: root/nix/libutil/util.hh
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2024-03-22 10:46:45 +0100
committerJosselin Poiret <dev@jpoiret.xyz>2024-03-22 10:46:45 +0100
commit54219dc3a440aaf86ece4a65fec1a97c0952f6f2 (patch)
tree6a60af28d1423be8fe15842261ee95748eede69b /nix/libutil/util.hh
parent92e1ea709dbd6c8eb27c4b002e9768958c147475 (diff)
parent3d2966e0b7dbf15a5cb497037ace73d1be92febf (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Change-Id: Id398a49a83cfe6f3a5ba0aee811d09ca12f897de
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);