IsolatedStorageFileStream Constructor (String, FileMode, FileAccess, FileShare, IsolatedStorageFile)

Initializes a new instance of the IsolatedStorageFileStream class giving access to the file designated by path, in the specified mode, with the specified file access, using the file sharing mode specified by share, and in the context of the IsolatedStorageFile specified by isf.

Namespace:  System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

public IsolatedStorageFileStream(
	string path,
	FileMode mode,
	FileAccess access,
	FileShare share,
	IsolatedStorageFile isf


Type: System.String
The relative path of the file within isolated storage.
Type: System.IO.FileMode
One of the FileMode values.
Type: System.IO.FileAccess
A bitwise combination of the FileAccess values.
Type: System.IO.FileShare
A bitwise combination of the FileShare values.
Type: System.IO.IsolatedStorage.IsolatedStorageFile
The IsolatedStorageFile in which to open the IsolatedStorageFileStream.


isf has been disposed.


path is badly formed.


path is null.


isf is null.


The directory in path does not exist.


No file was found and the mode is set to Open.

Version Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 When you use this constructor in a Windows Phone application, you cannot pass Delete for the share parameter. If you do, the constructor throws an IsolatedStorageException exception.


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions