IsolatedStorageFile.CreateFile Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Creates a file in the isolated store.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- path
- Type: System.String
The relative path of the file to be created in the isolated store.
| Exception | Condition |
|---|---|
| IsolatedStorageException | The isolated store has been removed. -or- Isolated storage is disabled. |
| ArgumentException | path is malformed. |
| ArgumentNullException | path is Nothing. |
| DirectoryNotFoundException | The directory in path does not exist. |
| ObjectDisposedException | 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.