At the moment, I think that whatever command retruns the filesize (stat?) uses simply the information from the dummy file.
But the file size will be incorrect in this case, so we need to explicitly store it in the dummy file and read it from there.
As for the other file attributes such as permissions and times: Either we use the ones from the dummy file, but then we have to carefully set them on the dummy file when it is swapped out for the real file and we must carefully makes sure that they are not overriden.
It is probably safer to store this information as well inside the dummy file.
At the moment, I think that whatever command retruns the filesize (stat?) uses simply the information from the dummy file. But the file size will be incorrect in this case, so we need to explicitly store it in the dummy file and read it from there.
As for the other file attributes such as permissions and times: Either we use the ones from the dummy file, but then we have to carefully set them on the dummy file when it is swapped out for the real file and we must carefully makes sure that they are not overriden.
It is probably safer to store this information as well inside the dummy file.