diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-11-30T22·43+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-11-30T22·43+0000 |
commit | 0565b5f2b35dc153dc98e1e3bd37476aa13ee4f1 (patch) | |
tree | a370db3e93b6e07f044fc436092c9d082da9c8be /src/libstore/store-api.cc | |
parent | aac547a8b3f481fda48cc1fe1082ce4c32be0e03 (diff) |
* More remote operations.
* Added new operation hasSubstitutes(), which is more efficient than querySubstitutes().size() > 0.
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r-- | src/libstore/store-api.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 9e8bc36d7f0d..f1e7c35620ad 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -6,6 +6,12 @@ namespace nix { +bool StoreAPI::hasSubstitutes(const Path & path) +{ + return !querySubstitutes(path).empty(); +} + + bool isInStore(const Path & path) { return path[0] == '/' |