1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Implement generic Store::queryValidPaths()

This commit is contained in:
Eelco Dolstra 2016-10-07 19:20:47 +02:00
parent 35db4f65a0
commit c663b84573
3 changed files with 12 additions and 4 deletions

View file

@ -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. */