IsolatedStorageFile represents an isolated storage area containing files and directories.
using System;
using System.IO;
using System.IO.IsolatedStorage;
public class MainClass
{
public static void Main()
{
IsolatedStorageFile isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly, null, null);
isoStore.CreateDirectory("TopLevelDirectory");
isoStore.CreateDirectory("TopLevelDirectory/SecondLevel");
isoStore.CreateDirectory("AnotherTopLevelDirectory/InsideDirectory");
IsolatedStorageFileStream isoStream1 = new IsolatedStorageFileStream("InTheRoot.txt", FileMode.Create, isoStore);
isoStream1.Close();
IsolatedStorageFileStream isoStream2 = new IsolatedStorageFileStream("HereIAm.txt", FileMode.Create, isoStore);
isoStream2.Close();
}
}
Related examples in the same category