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.
I could not find the Stream.Size. This works below...
StorageFile myFile = await myFolder.GetFileAsync("myFile.txt");
await FileIO.WriteTextAsync(myFile, "");
Microsoft Certified Solutions Developer - Windows Store Apps Using C#
This worked for me:
using (var stream = await File.OpenStreamForWriteAsync())
Where File is the StorageFile you opened.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?