KonstantinSchubert / zero

Local file system transparently swapping to the cloud
Other
774 stars 21 forks source link

Return file size of actual file instead of file size of dummg file #1

Open KonstantinSchubert opened 6 years ago

KonstantinSchubert commented 6 years ago

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.