Reputation: 257
May I ask about how to store the temporary data and read temporary data from Isolated storage and Isolated storage support for Universal Windows Platform (UWP) App Development? Thank You.
Upvotes: 2
Views: 1846
Reputation: 464
Isolated storage used in WP silverlight .
If you want a temporary folder to store you can use ApplicationData.Current.TemporaryFolder
If you want a Folder to store application data for a long time and you need them you can use ApplicationData.Current.LocalFolder
If you want your app to have a sync between devices , it means you want to have same data on different devices you have to use RoamingFolder instead of LocalFolder . RoamingFolder share application data between devices and help you to make a more universal app .
Upvotes: 6
Reputation: 684
Use the ApplicationData class to get a StorageFolder instance for the temp folder:
var tempFolder = ApplicationData.Current.TemporaryFolder;
You can then use the StorageFolder to create a file in the temp folder:
var tempFile = await tempFolder.CreateFileAsync("TempFileName.tmp", CreationCollisionOption.ReplaceExisting);
Or use it to open an existing file:
var tempFile = await tempFolder.GetFileAsync("TempFileName.tmp");
Upvotes: 2