IsolatedStorageFile Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Represents an isolated storage area containing files and directories.
Assembly: mscorlib (in mscorlib.dll)
The IsolatedStorageFile type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AvailableFreeSpace | Gets a value that represents the amount of free space available for isolated storage. |
![]() | Quota | Gets a value that represents the maximum amount of space available for isolated storage. |
| Name | Description | |
|---|---|---|
![]() | CopyFile(String, String) | Copies an existing file to a new file. |
![]() | CopyFile(String, String, Boolean) | Copies an existing file to a new file, and optionally overwrites an existing file. |
![]() | CreateDirectory | Creates a directory in the isolated storage scope. |
![]() | CreateFile | Creates a file in the isolated store. |
![]() | DeleteDirectory | Deletes a directory in the isolated storage scope. |
![]() | DeleteFile | Deletes a file in the isolated store. |
![]() | DirectoryExists | Determines whether the specified path refers to an existing directory in the isolated store. |
![]() | Dispose | Releases all resources used by the IsolatedStorageFile. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | FileExists | Determines whether the specified path refers to an existing file in the isolated store. |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetCreationTime | Returns the creation date and time of a specified file or directory. |
![]() | GetDirectoryNames() | Enumerates the directories in the root of an isolated store. |
![]() | GetDirectoryNames(String) | Enumerates directories in an isolated storage scope that match a given pattern. |
![]() | GetFileNames() | Obtains the names of files in the root of an isolated store. |
![]() | GetFileNames(String) | Enumerates files in isolated storage scope that match a given pattern. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLastAccessTime | Returns the date and time a specified file or directory was last accessed. |
![]() | GetLastWriteTime | Returns the date and time a specified file or directory was last written to. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | GetUserStoreForApplication | Obtains user-scoped isolated storage for use by an application that calls from the virtual host domain. |
![]() | IncreaseQuotaTo | Enables an application to explicitly request a larger quota size, in bytes. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MoveDirectory | Moves a specified directory and its contents to a new location. |
![]() | MoveFile | Moves a specified file to a new location, and optionally lets you specify a new file name. |
![]() | OpenFile(String, FileMode) | Opens a file in the specified mode. |
![]() | OpenFile(String, FileMode, FileAccess) | Opens a file in the specified mode with the specified file access. |
![]() | OpenFile(String, FileMode, FileAccess, FileShare) | Opens a file in the specified mode with read, write, or read/write access and the specified sharing option. |
![]() | Remove | Removes the isolated storage scope and all its contents. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
This class abstracts the virtual file system for isolated storage. An IsolatedStorageFile object corresponds to a specific isolated storage scope, where files represented by IsolatedStorageFileStream objects exist. Applications can use isolated storage to save data in their own isolated portion of the file system, without having to specify a particular path within the file system.
The root of the virtual file system is located in a per-user, obfuscated folder on the physical file system. Each unique identifier provided by the host maps to a different root, which gives each application its own virtual file system. An application cannot navigate out of its own file system into another.
Since isolated stores are scoped to particular assemblies, most other managed code will not be able to access your code's data (highly trusted managed code and administration tools can access stores from other assemblies). Unmanaged code can access any isolated stores.
The following example shows how to use an IsolatedStorageFile object for most I/O tasks. For information on how to compile and run this example code, see Building examples that have static TextBlock controls for Windows Phone 8



