czim / file-handling

File Handling Helper
MIT License
14 stars 9 forks source link

Garbage collection support: track temporary files to clean up in strategies #5

Closed czim closed 5 years ago

czim commented 6 years ago

Temporary files created for strategy processing are not automatically deleted.

This package needs to offer the means to handle garbage collection for specific files created, both by default and added on the fly.

The aim is to at least provide clients that use this package with a list of 'garbage' files that should be cleaned up after processing is done for each file (and all its variants).

czim commented 5 years ago

Addressed in version 1.1.1. You can now ask the VariantProcessor which temporary files it created using getTemporaryFiles. This returns a list of StorableFileInterface instances.

czim commented 5 years ago

1.1.1 did not actually help much, as the Handler should normally be used rather than addressing the Processor directly. In 1.1.2, the FileHandler interface has been altered to pass on the temporary files created.

Note that this may be a breaking change for you.