Clearing StorageFile Content
-
Thursday, November 29, 2012 8:50 PM
Yes, this should be simple... but not seen a way to do this.
How can you clear the contents from a StorageFile? Is there an apprpriate Method to call?
I'm talking about the actual data in a specific File, not clearing all data like using the ClearAsync Method.
Thanks
All Replies
-
Thursday, November 29, 2012 9:24 PMStream.Size = 0
Microsoft Certified Solutions Developer - Windows Store Apps Using C#
-
Friday, November 30, 2012 2:21 PM
I could not find the Stream.Size. This works below...
StorageFile myFile = await myFolder.GetFileAsync("myFile.txt");
await FileIO.WriteTextAsync(myFile, "");
- Marked As Answer by shaggygi Friday, November 30, 2012 2:21 PM


