about summary refs log tree commit diff
path: root/src/store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/store.cc')
-rw-r--r--src/store.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/store.cc b/src/store.cc
index 6f1a2fc39d1c..6157b4bc22a1 100644
--- a/src/store.cc
+++ b/src/store.cc
@@ -148,6 +148,15 @@ void unregisterPath(const string & _path)
 }
 
 
+bool queryPathId(const string & path, FSId & id)
+{
+    string s;
+    if (!queryDB(nixDB, dbPath2Id, path, s)) return false;
+    id = parseHash(s);
+    return true;
+}
+
+
 bool isInPrefix(const string & path, const string & _prefix)
 {
     string prefix = canonPath(_prefix + "/");