2

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.

Eng Soon Cheah
  • 257
  • 1
  • 10
  • 42

2 Answers2

6

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 .

Ali NGame
  • 449
  • 3
  • 14
2

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");
Roger Hartley
  • 684
  • 3
  • 11