Basically, I want to create a program that will monitor whenever another program tries to open a file F, and if that file doesn't exist the program will return a default file (without actually creating a file) the caller program will now proceed as if nothing went wrong.
Not only to read calls but to write calls too. So, lets say the caller used fopen() to open the file F, my program would intercept that and return my default file bytes (without actually creating a file with them), then if the caller tries to write to the file, my program would intercept that and do nothing. The important part is to keep the caller oblivious to the non existance of the file, it should work as if there was a file, even if there isn't. The caller is a generic program, so I don't have control to its inside.
I am thinking about ionotify, as I saw in this question