aboutsummaryrefslogtreecommitdiff
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 6f1a2fc39..6157b4bc2 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 + "/");