Plan
Plan copied to clipboard
Clean up old downloaded dependencies no longer in use
I would like to be able to..
Automatically clean up /plugins/Plan/libraries folder of unused libraries
Is your feature request related to a problem? Please describe.
When updating library versions the old versions stay behind in the library folder without being deleted.
The resource files generated by DependencyDownload could be read to verify which files should be deleted as they have a hash in them.
DependencyManager has a cleanupCacheDirectory method, though that only accounts for the dependenc(y/ies) in that DependencyManager.
I opened https://github.com/Vankka/DependencyDownload/issues/18 for adding the cleanup method to ApplicationDependencyManager (allows managing single-use DependencyManagers) which would make this much easier to solve with multiple DependencyManagers in use
Thanks! :)
Yep looks like using the cleanupCacheDirectory cleans any files not loaded by that DependencyManager, so if used by both, all files will be deleted (but one will fail since it's loaded already