artefactual-sdps / temporal-activities

Temporal activities is a library of general purpose activities
Apache License 2.0
1 stars 0 forks source link

Problem: the removefiles activity can't remove files/directories based on a pattern #12

Closed jraddaoui closed 6 months ago

jraddaoui commented 6 months ago

Is your feature request related to a problem? Please describe.

The removefiles activity can only delete files and directories if their name fully matches one from the RemoveNames configuration. I'd like to remove all files and directories matching a pattern. For example, I'd like to remove all files ending in _PREMIS.xml

Describe the solution you'd like

Add a new configuration option to include a list of regular expressions that will remove any matching file/directory. Regular expressions must follow the accepted regex package syntax.

Describe alternatives you've considered

None.

Additional context

https://github.com/artefactual-sdps/temporal-activities/pull/3#pullrequestreview-2001844771