IStorageFile interface
Represents a file. Provides information about the file and its contents, and ways to manipulate them.
Syntax
public interface IStorageFile : IStorageItem, IRandomAccessStreamReference, IInputStreamReference
Attributes
- GuidAttribute("fa3f6186-4214-428c-a64c-14c9ac7315ea")
- VersionAttribute(NTDDI_WIN8)
Members
The IStorageFile interface has these types of members:
Methods
The IStorageFile interface has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| CopyAndReplaceAsync | Replaces the specified file with a copy of the current file. |
| CopyAsync(IStorageFolder) | Creates a copy of the file in the specified folder. |
| CopyAsync(IStorageFolder, String) | Creates a copy of the file in the specified folder, using the desired name. |
| CopyAsync(IStorageFolder, String, NameCollisionOption) | Creates a copy of the file in the specified folder, using the desired name. This method also specifies what to do if an existing file in the specified folder has the same name. |
| MoveAndReplaceAsync | Moves the current file to the location of the specified file and replaces the specified file in that location. |
| MoveAsync(IStorageFolder) | Moves the current file to the specified folder. |
| MoveAsync(IStorageFolder, String) | Moves the current file to the specified folder and renames the file according to the desired name. |
| MoveAsync(IStorageFolder, String, NameCollisionOption) | Moves the current file to the specified folder and renames the file according to the desired name. This method also specifies what to do if a file with the same name already exists in the specified folder. |
| OpenAsync | Opens a random-access stream over the file. |
| OpenTransactedWriteAsync | Opens a transacted, random-access stream to the file. |
Properties
The IStorageFile interface has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the MIME type of the contents of the file. | |
| Read-only | Gets the type (file name extension) of the file. |
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
|
|
Metadata |
|
|
Capabilities |
|
See also
Build date: 5/16/2013