From 49231fbe419d37717b0d951377fbfc9bf445dd55 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 21 Jul 2003 14:46:01 +0000 Subject: * Changes to the command line syntax of Nix. * A function to find all Nix expressions whose output ids are completely contained in some set. Useful for uploading relevant Nix expressions to a shared cache. --- src/store.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/store.cc') 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 + "/"); -- cgit 1.4.1