Hey all,
So I have an issue that has been causing my head to spin when writing to an SD card. I have searched all the threads and couldn't find anything like my issue.
I can read perfectly fine from the SD card, but when writing, it will only write over text that is currently in the file.
string FilePath = @"\SD\yourfile.txt"; using (var fs = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, 512)) using (var sw = new StreamWriter(fs)) { sw.WriteLine("Will This String Write?"); Thread.Sleep(1000); sw.WriteLine("done."); Thread.Sleep(1000); sw.Flush(); } Debug.Print("We did something");
So for example if my text file contains the string "My String" then when I run the above program, the only thing in the text file will be "Will This" instead of the entire string. And if there is nothing in the file at all, then nothing is written. I have the lastest firmware and SDK's. In fact I recently just reinstalled everything. I am also using a 2GB sd card as recommended.
Thanks for your help!