An "even more creative" idea. Completely untested:
Create a single byte file (man fallocate) and put a copy in to every file in the moodledata/filedir/. Means, if the original has a file filedir/ab/cd/abcd[40charhash], then 'cp singlebytefile /path/to/moodledata/filedir/ab/cd/abcd[40charhash]' - of course scripted.
Then Moodle will not complain about missing files, but will "display" our singlebytefile instead.
@Others, meant only for playground Moodle sites. Completely isolate this action from any production instances!
Create a single byte file (man fallocate) and put a copy in to every file in the moodledata/filedir/. Means, if the original has a file filedir/ab/cd/abcd[40charhash], then 'cp singlebytefile /path/to/moodledata/filedir/ab/cd/abcd[40charhash]' - of course scripted.
Then Moodle will not complain about missing files, but will "display" our singlebytefile instead.
@Others, meant only for playground Moodle sites. Completely isolate this action from any production instances!