Hi Manolo,
the function should look like:
<your-plugin>_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
...
}
Here (https://docs.moodle.org/dev/File_API#Serving_files_to_users) you can find a good example for it.
Best regards
Andreas