it's an essential problem. I just wonder to buy N+2, but after read this thread.... I think twice, maybe it's ok to keep develop my project using N+
It works fine if you flush afterwards, eg:
public void writeToFile(string data) { using (FileStream filestream = new FileStream(filename, FileMode.Append)) { using (StreamWriter write = new StreamWriter(filestream)) { write.WriteLine(DateTime.Now + "," + data); } } VolumeInfo.GetVolumes()[0].FlushAll(); // Force write to sd card }
In any case, even if you do not flush, the card will be written to eventually. I believe the data is buffered in memory and then written to when it reaches a certain level. I think this is to avoid too many short read/write operations to the SD Card which will probably impact on performance.
- asciiman and bgreer5050 like this