1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-25 11:49:35 +01:00

* `nix --delete' command.

This commit is contained in:
Eelco Dolstra 2003-06-23 14:40:49 +00:00
parent c0cbaef4be
commit 692b562342
6 changed files with 66 additions and 2 deletions

View file

@ -135,6 +135,18 @@ string fetchURL(string url)
#endif
void deleteValue(Hash hash)
{
string name;
if (queryDB(nixDB, dbRefs, hash, name)) {
string fn = absValuePath(name);
deletePath(fn);
delDB(nixDB, dbRefs, hash);
}
}
/* !!! bad name, "query" implies no side effect => getValuePath() */
string queryValuePath(Hash hash)
{
bool checkedNet = false;