summary refs log tree commit diff
path: root/src/libutil/archive.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-12-12 21:51:02 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-12-12 21:51:02 +0000
commitb438d37558eab56a2927771013c9080675381ba8 (patch)
tree712ef93c6c82e7f502eeac1283f4844a010314f3 /src/libutil/archive.hh
parent3130f1f0fa484495ebca89bd458cf7fffa522687 (diff)
downloadguix-b438d37558eab56a2927771013c9080675381ba8.tar.gz
* In dumpPath(): pass a function object that allows files to be
  selectively in/excluded from the dump.

Diffstat (limited to 'src/libutil/archive.hh')
-rw-r--r--src/libutil/archive.hh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libutil/archive.hh b/src/libutil/archive.hh
index c70ef3f1c8..70e836055c 100644
--- a/src/libutil/archive.hh
+++ b/src/libutil/archive.hh
@@ -45,7 +45,16 @@ namespace nix {
 
      `+' denotes string concatenation. */
 
-void dumpPath(const Path & path, Sink & sink);
+struct DumpFilter
+{
+    virtual ~DumpFilter() { }
+    virtual bool operator () (const Path & path) { return true; }
+};
+
+extern DumpFilter defaultDumpFilter;
+
+void dumpPath(const Path & path, Sink & sink,
+    DumpFilter & filter = defaultDumpFilter);
 
 void restorePath(const Path & path, Source & source);