IsolatedStorageFileStream Constructor (String, FileMode, FileAccess, FileShare, IsolatedStorageFile)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
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.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Sub New ( _ path As String, _ mode As FileMode, _ access As FileAccess, _ share As FileShare, _ isf As IsolatedStorageFile _ )
Parameters
- path
- Type: System.String
The relative path of the file within isolated storage.
- mode
- Type: System.IO.FileMode
One of the FileMode values.
- access
- Type: System.IO.FileAccess
A bitwise combination of the FileAccess values.
- share
- Type: System.IO.FileShare
A bitwise combination of the FileShare values.
- isf
- Type: System.IO.IsolatedStorage.IsolatedStorageFile
The IsolatedStorageFile in which to open the IsolatedStorageFileStream.
| Exception | Condition |
|---|---|
| IsolatedStorageException | isf has been disposed. -or- path is badly formed. -or- path is Nothing. -or- isf is Nothing. -or The directory in path does not exist. -or- No file was found and the mode is set to Open. |
Version Notes
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.