I am currently writing a plugin in C++. For my functionality I ask the API to save out a file. The API gives me a return value when the file is written… or so it seemd. The problem is, that this return value is returned too early so that I can not be sure, that the file is written completely.
Is there a possibility of checking the write completeness of the file independent of the api?
That’s because the system does not write data to disk as soon as it’s requested, but still returns. In C, you could use
int fflush (FILE *stream), but I don’t know how you’d do that in C++.