IsolatedStorageFile Class

Overview

  • Represents a sandbox location to store application specific data in.
  • Assembly/Machine store for application-level data.
  • Assembly/User store for user-level data.
  • Use IsolatedStorageFileStream to work with files in a store.

Good practice

  • Don't write your state to local .xml files everywhere on the system, but store them in an IsolatedStorage.

Examples

Initialize Store

IsolatedStorageFile a = IsolatedStorageFile.GetMachineStoreForAssembly();
 
foreach (var f in a.GetFileNames("*"))
{
    Console.WriteLine(f);
}