summary refs log tree commit diff
path: root/nix/libutil/util.hh
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-01-15 00:09:46 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-01-15 00:09:46 +0100
commit3cfe76bec06fbd8bb7e7cb3387866fefbcad674f (patch)
treeb66780d205fb50fd44d0bbb38f5df99cf3167ba1 /nix/libutil/util.hh
parentec836b46bf52a5f86c61f50e3a2c3330a7ee3665 (diff)
parent574a71a7a9668aa184661c58e1f18a4d4fccd792 (diff)
downloadguix-3cfe76bec06fbd8bb7e7cb3387866fefbcad674f.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libutil/util.hh')
-rw-r--r--nix/libutil/util.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh
index 6a6e07c478..9e3c14bdd4 100644
--- a/nix/libutil/util.hh
+++ b/nix/libutil/util.hh
@@ -94,10 +94,12 @@ void writeLine(int fd, string s);
 
 /* Delete a path; i.e., in the case of a directory, it is deleted
    recursively.  Don't use this at home, kids.  The second variant
-   returns the number of bytes and blocks freed. */
+   returns the number of bytes and blocks freed, and 'linkThreshold' denotes
+   the number of links under which a file is accounted for in 'bytesFreed'.  */
 void deletePath(const Path & path);
 
-void deletePath(const Path & path, unsigned long long & bytesFreed);
+void deletePath(const Path & path, unsigned long long & bytesFreed,
+    size_t linkThreshold = 1);
 
 /* Create a temporary directory. */
 Path createTempDir(const Path & tmpRoot = "", const Path & prefix = "nix",