IsolatedStorageFile.CreateFile Method
Creates a file in the isolated store.
Namespace: System.IO.IsolatedStorage
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 null. |
| 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.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
What happens when the file already exists?
What happens when the file already exists? An Exception or will it just silently overwrites the file?
- 1/29/2012
- mvadu
What are the default values for FileMode, FileAccess and FileShare?
The Remarks section states that this method is similar to creating the file stream directly, but with what arguments? For example, does the file have read and write access, or just write access?
- 8/22/2011
- Dave Sexton