將資料儲存到應用快取
該 ApplicationData.Current.LocalFolder API 允許我們可以訪問應用程式快取:
var file = await ApplicationData.Current.LocalFolder.CreateFileAsync("myFile.dat", CreationCollisionOption.ReplaceExisting);
該 FileIO 專注類包含了一套實用的方法來輕鬆地將資料新增到檔案中:
await FileIO.WriteBytesAsync(file, array);
await FileIO.AppendTextAsync(file, "text");
await FileIO.WriteBufferAsync(file, iBuffer);