mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 17:59:36 +01:00
Factor out GC path deletion so it can be overridden.
This commit is contained in:
parent
b852bdb3f8
commit
98edbb9686
2 changed files with 16 additions and 2 deletions
|
|
@ -97,6 +97,13 @@ struct GcStore : public virtual Store
|
|||
* Perform a garbage collection.
|
||||
*/
|
||||
virtual void collectGarbage(const GCOptions & options, GCResults & results) = 0;
|
||||
|
||||
/**
|
||||
* Called by `collectGarbage` to recursively delete a path.
|
||||
* The default implementation simply calls `deletePath`, but it can be
|
||||
* overridden by stores that wish to provide their own deletion behaviour.
|
||||
*/
|
||||
virtual void deleteGCPath(const Path & path, uint64_t & bytesFreed);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue