about summary refs log tree commit diff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 74014b47e513..a830ae5bbd0c 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -361,6 +361,17 @@ void Store::queryPathInfo(const Path & storePath,
 }
 
 
+PathSet Store::queryValidPaths(const PathSet & paths)
+{
+    PathSet valid;
+
+    for (auto & path : paths)
+        if (isValidPath(path)) valid.insert(path);
+
+    return valid;
+}
+
+
 /* Return a string accepted by decodeValidPathInfo() that
    registers the specified paths as valid.  Note: it's the
    responsibility of the caller to provide a closure. */