This is not ideal because it keeps the entire file list in memory. It should be possible to have a flavor of Execute that does the filtering *before* ever writing to the output buffer.

I'm fine starting with this logic for now (assuming it works well and without crazy mem usage for Moodle), but please add a comment to note this possibility.