February 14, 2014
Creates a file in the isolated store.
Assembly: mscorlib (in mscorlib.dll)
'Déclaration Public Function CreateFile ( _ path As String _ ) As IsolatedStorageFileStream
- Type: System.String
The relative path of the file to be created in the isolated store.
Return ValueType: System.IO.IsolatedStorage.IsolatedStorageFileStream
A new isolated storage file.
The isolated store has been removed.
Isolated storage is disabled.
path is malformed.
path is Nothing.
The directory in path does not exist.
The isolated store has been disposed.
This method is equivalent to using the IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile) constructor.
The following example creates files in the root of the store and in its subdirectories. This example is part of a larger example provided for IsolatedStorageFile class.
' Create a file in the root. Dim rootFile As IsolatedStorageFileStream = _ store.CreateFile("InTheRoot.txt") rootFile.Close() ' Create a file in a subdirectory. Dim subDirFile As IsolatedStorageFileStream = _ store.CreateFile(Path.Combine(subdirectory1, "MyApp1A.txt")) subDirFile.Close()