launch-pad
launch-pad copied to clipboard
Add support for `filter`
Add support for CKAN's filter
directive.
Here are some thoughts about this: Before, when just copying entire folders, I just pointed Cocoa's FileManager
towards a directory and a target directory, and it would do the right thing.
With directives like filter
, filter_regexp
, include_only
, etc., we
- have to build up a list of files in the correct directories to copy,
- then filter them, or regex_filter them,
- then check any rename directives, updating the destination directory names and destination file names if necessary
- and then copy them to the destination, creating any intermediate directories in-between.
Doing this right is a bit daunting, and I have kinda recoiled from the complexity of this, because I always feel like there MUST be a super easy way to do this that I'm just overlooking. But I guess since I haven't found any easy ways to in the meantime, I'm just gonna go ahead and try to do it the hard way. Suggestions are very welcome.