One standard way to deal with this kind of thing is to open the file - then immediately unlink the file. The file handle can continue to be used to read / write the file.
The file is removed from the directory list (so is no longer visible). It is removed completely when the file handle is closed - or when app stops running (which closes all open file handles).
May mean passing file handle around instead of filename but that's a trivial and automatable change.
One standard way to deal with this kind of thing is to open the file - then immediately unlink the file. The file handle can continue to be used to read / write the file.
The file is removed from the directory list (so is no longer visible). It is removed completely when the file handle is closed - or when app stops running (which closes all open file handles).
May mean passing file handle around instead of filename but that's a trivial and automatable change.
Maybe you guys can do something similar?