I want to make changes the functionality of certain functions in lib/filelib.php (functions: "send_stored_file" and/or "send_file") but I don't want to do core changes to the code.
I have my own theme but I don't see a way to use renderers to override those functions.
isn't there a way without core changes?
I have moodle 3.1 installed
If you're doing that in a plugin, you should implement the function MYPLUGIN_pluginfile(...) in your plugin's lib.php, and control access there.