Provides synchronous access to the properties exposed off StorageFile and lets an app perform asynchronous file operations such as copy, delete, move, and rename.
Syntax
/* For information about creating or accessing this object, see Remarks. */
Attributes
- MarshalingBehaviorAttribute(Agile)
- VersionAttribute(NTDDI_WIN8)
Members
The FileInformation class has these types of members:
Events
The FileInformation class has these events.
| Event | Description |
|---|---|
| PropertiesUpdated | Occurs when one or more of the StorageFile's properties is updated. |
| ThumbnailUpdated | Fires when the StorageFile's thumbnail is updated or a better quality thumbnail is available. |
Methods
The FileInformation class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
| Method | Description |
|---|---|
| CopyAndReplaceAsync | Replaces the specified StorageFile with a copy of the current file. |
| CopyAsync(IStorageFolder) | Creates a copy of the StorageFile and stores it in the specified StorageFolder. |
| CopyAsync(IStorageFolder, String) | Creates a copy of the StorageFile, gives it the specified file name, and stores it in the specified StorageFolder. |
| CopyAsync(IStorageFolder, String, NameCollisionOption) | Creates a copy of the StorageFile, gives it the specified file name, and stores it in the specified StorageFolder. The method also specifies what to do if a file with the same name already exists in the specified folder. |
| DeleteAsync() | Deletes a file. |
| DeleteAsync(StorageDeleteOption) | Deletes a file, optionally moving the deleted file to the recycle bin. |
| GetBasicPropertiesAsync | Retrieves the basic properties of the StorageFile. |
| GetThumbnailAsync(ThumbnailMode) | Retrieves the thumbnail that is associated with the StorageFile. |
| GetThumbnailAsync(ThumbnailMode, UInt32) | Retrieves the thumbnail that is associated with the StorageFile, scaling it to the specified size. |
| GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions) | Retrieves the thumbnail that is associated with the StorageFile, based on the specified options. |
| IsOfType | Determines whether the loaded StorageFile is the specified type. |
| MoveAndReplaceAsync | Moves the current StorageFile from its location and uses it to replace the specified StorageFile. |
| MoveAsync(IStorageFolder) | Moves the StorageFile to the specified StorageFolder. |
| MoveAsync(IStorageFolder, String) | Moves the StorageFile to the specified folder, and gives the file the specified file name. |
| MoveAsync(IStorageFolder, String, NameCollisionOption) | Moves the StorageFile to the specified folder and gives it the specified file name. The 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 StorageFile. |
| OpenReadAsync | Opens a read-only, random-access stream over the StorageFile. |
| OpenSequentialReadAsync | Opens a read-only, sequential-access stream over the StorageFile. |
| OpenTransactedWriteAsync | Opens a random-access stream to the file that can be used for transacted-write operations. |
| RenameAsync(String) | Renames the StorageFile. |
| RenameAsync(String, NameCollisionOption) | Renames the StorageFile, and specifies what to do if a file with the same name already exists in the current folder. |
Properties
The FileInformation class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the attributes of a file. | |
| Read-only | Gets an object that contains the basic properties information of the file. | |
| Read-only | Gets a string that describes the contents of the file. | |
| Read-only | Gets the date that the file was created. | |
| Read-only | Gets the user-friendly name of the StorageFile. | |
| Read-only | Gets the display type of the StorageFile. | |
| Read-only | Gets an object that provides access to the document properties of the StorageFile, such as the title, author name, and so on. | |
| Read-only | Gets the file type. | |
| Read-only | Gets the identifier that uniquely identifies the StorageFile relative to other items in the same folder. | |
| Read-only | Gets the image properties of the StorageFile, such as the title, rating, date that the image was taken, and so on. | |
| Read-only | Gets the music properties associated with the StorageFile, such as the album name, artist name, bit rate, and so on. | |
| Read-only | Gets the name of the StorageFile. | |
| Read-only | Gets the path of the StorageFile. | |
| Read-only | Gets an object for retrieving the properties of the StorageFile. | |
| Read-only | Gets the thumbnail associated with the StorageFile. | |
| Read-only | Gets an object that provides access to the video properties of the StorageFile, such as the duration, rating, date released, and so on. |
Remarks
You can retrieve a list of FileInformation objects by calling one of the fileInformationFactory.getFilesAsync methods.
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012