FileInformation FileInformation FileInformation FileInformation Class

Definition

Provides synchronous access to the properties exposed off StorageFile and lets an app perform asynchronous file operations such as copy, delete, move, and rename.

public sealed class FileInformationpublic sealed class FileInformationPublic NotInheritable Class FileInformationpublic sealed class FileInformation
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

You can retrieve a list of FileInformation objects by calling one of the GetFilesAsync(UInt32, UInt32) methods.

Properties

Attributes Attributes Attributes Attributes

Gets the attributes of a file.

public FileAttributes Attributes { get; }public FileAttributes Attributes { get; }Public ReadOnly Property Attributes As FileAttributespublic FileAttributes Attributes { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

BasicProperties BasicProperties BasicProperties BasicProperties

Gets an object that contains the basic properties information of the file.

public BasicProperties BasicProperties { get; }public BasicProperties BasicProperties { get; }Public ReadOnly Property BasicProperties As BasicPropertiespublic BasicProperties BasicProperties { get; }
Value
BasicProperties BasicProperties BasicProperties BasicProperties

The basic properties object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ContentType ContentType ContentType ContentType

Gets a string that describes the contents of the file.

public string ContentType { get; }public string ContentType { get; }Public ReadOnly Property ContentType As stringpublic string ContentType { get; }
Value
string string string string

The content type string.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

DateCreated DateCreated DateCreated DateCreated

Gets the date that the file was created.

public DateTime DateCreated { get; }public DateTimeOffset DateCreated { get; }Public ReadOnly Property DateCreated As DateTimeOffsetpublic DateTime DateCreated { get; }
Value
DateTime DateTime DateTime DateTime

The file creation date.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

If the date property isn't set, this value defaults to 0 which can be translated into misleading dates in different programming languages. In JavaScript, for example, 0 translates to December 16, 1600. You should always check that this property is a real value and not 0.

DisplayName DisplayName DisplayName DisplayName

Gets the user-friendly name of the StorageFile.

public string DisplayName { get; }public string DisplayName { get; }Public ReadOnly Property DisplayName As stringpublic string DisplayName { get; }
Value
string string string string

The user-friendly name of the StorageFile.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

DisplayType DisplayType DisplayType DisplayType

Gets the display type of the StorageFile.

public string DisplayType { get; }public string DisplayType { get; }Public ReadOnly Property DisplayType As stringpublic string DisplayType { get; }
Value
string string string string

The display type.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

DocumentProperties DocumentProperties DocumentProperties DocumentProperties

Gets an object that provides access to the document properties of the StorageFile, such as the title, author name, and so on.

public DocumentProperties DocumentProperties { get; }public DocumentProperties DocumentProperties { get; }Public ReadOnly Property DocumentProperties As DocumentPropertiespublic DocumentProperties DocumentProperties { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

FileType FileType FileType FileType

Gets the file type.

public string FileType { get; }public string FileType { get; }Public ReadOnly Property FileType As stringpublic string FileType { get; }
Value
string string string string

The file type.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

FolderRelativeId FolderRelativeId FolderRelativeId FolderRelativeId

Gets the identifier that uniquely identifies the StorageFile relative to other items in the same folder.

public string FolderRelativeId { get; }public string FolderRelativeId { get; }Public ReadOnly Property FolderRelativeId As stringpublic string FolderRelativeId { get; }
Value
string string string string

The folder-relative identifier.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ImageProperties ImageProperties ImageProperties ImageProperties

Gets the image properties of the StorageFile, such as the title, rating, date that the image was taken,

and so on.

public ImageProperties ImageProperties { get; }public ImageProperties ImageProperties { get; }Public ReadOnly Property ImageProperties As ImagePropertiespublic ImageProperties ImageProperties { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

IsAvailable IsAvailable IsAvailable IsAvailable

Indicates if the current file has been downloaded or can be downloaded.

public bool IsAvailable { get; }public bool IsAvailable { get; }Public ReadOnly Property IsAvailable As boolpublic bool IsAvailable { get; }
Value
bool bool bool bool

True if the file has been downloaded or can be downloaded. Otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

MusicProperties MusicProperties MusicProperties MusicProperties

Gets the music properties associated with the StorageFile, such as the album name, artist name, bit rate, and so on.

public MusicProperties MusicProperties { get; }public MusicProperties MusicProperties { get; }Public ReadOnly Property MusicProperties As MusicPropertiespublic MusicProperties MusicProperties { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Name Name Name Name

Gets the name of the StorageFile.

public string Name { get; }public string Name { get; }Public ReadOnly Property Name As stringpublic string Name { get; }
Value
string string string string

The name.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Path Path Path Path

Gets the path of the StorageFile.

public string Path { get; }public string Path { get; }Public ReadOnly Property Path As stringpublic string Path { get; }
Value
string string string string

The path.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties Properties Properties Properties

Gets an object for retrieving the properties of the StorageFile.

public StorageItemContentProperties Properties { get; }public StorageItemContentProperties Properties { get; }Public ReadOnly Property Properties As StorageItemContentPropertiespublic StorageItemContentProperties Properties { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Provider Provider Provider Provider

Gets the StorageProvider object that contains info about the service that stores the current file.

public StorageProvider Provider { get; }public StorageProvider Provider { get; }Public ReadOnly Property Provider As StorageProviderpublic StorageProvider Provider { get; }
Value
StorageProvider StorageProvider StorageProvider StorageProvider

The StorageProvider object that contains info about the service that stores the current file. The file may be stored by the local file system or by a remote service like Microsoft OneDrive.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Thumbnail Thumbnail Thumbnail Thumbnail

Gets the thumbnail associated with the StorageFile.

public StorageItemThumbnail Thumbnail { get; }public StorageItemThumbnail Thumbnail { get; }Public ReadOnly Property Thumbnail As StorageItemThumbnailpublic StorageItemThumbnail Thumbnail { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

VideoProperties VideoProperties VideoProperties VideoProperties

Gets an object that provides access to the video properties of the StorageFile, such as the duration, rating, date released, and so on.

public VideoProperties VideoProperties { get; }public VideoProperties VideoProperties { get; }Public ReadOnly Property VideoProperties As VideoPropertiespublic VideoProperties VideoProperties { get; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

CopyAndReplaceAsync(IStorageFile) CopyAndReplaceAsync(IStorageFile) CopyAndReplaceAsync(IStorageFile) CopyAndReplaceAsync(IStorageFile)

Replaces the specified StorageFile with a copy of the current file.

public IAsyncAction CopyAndReplaceAsync(IStorageFile fileToReplace)public IAsyncAction CopyAndReplaceAsync(IStorageFile fileToReplace)Public Function CopyAndReplaceAsync(fileToReplace As IStorageFile) As IAsyncActionpublic IAsyncAction CopyAndReplaceAsync(IStorageFile fileToReplace)
Parameters
fileToReplace
IStorageFile IStorageFile IStorageFile IStorageFile

The StorageFile to be replaced.

Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder) CopyAsync(IStorageFolder)

Creates a copy of the StorageFile and stores it in the specified StorageFolder.

public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder)public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder)Public Function CopyAsync(destinationFolder As IStorageFolder) As IAsyncOperation( Of StorageFile )public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder)
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The folder in which to store the copied file.

Returns

When this method completes successfully, it returns the copy as a StorageFile object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

CopyAsync(IStorageFolder, String) CopyAsync(IStorageFolder, String) CopyAsync(IStorageFolder, String) CopyAsync(IStorageFolder, String)

Creates a copy of the StorageFile, gives it the specified file name, and stores it in the specified StorageFolder.

public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName)public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName)Public Function CopyAsync(destinationFolder As IStorageFolder, desiredNewName As String) As IAsyncOperation( Of StorageFile )public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName)
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The folder in which to store the copied file.

desiredNewName
System.String System.String System.String System.String

The name of the new copy.

Returns

When this method completes successfully, it returns the copy as a StorageFile object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

CopyAsync(IStorageFolder, String, NameCollisionOption) CopyAsync(IStorageFolder, String, NameCollisionOption) CopyAsync(IStorageFolder, String, NameCollisionOption) 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.

public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)Public Function CopyAsync(destinationFolder As IStorageFolder, desiredNewName As String, option As NameCollisionOption) As IAsyncOperation( Of StorageFile )public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The folder in which to store the copied file.

desiredNewName
System.String System.String System.String System.String

The name of the new copy.

option
NameCollisionOption NameCollisionOption NameCollisionOption NameCollisionOption

A value that indicates what to do if the file name already exists in the destination folder.

Returns

When this method completes successfully, it returns the copy as a StorageFile object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

DeleteAsync() DeleteAsync() DeleteAsync() DeleteAsync()

Deletes a file.

public IAsyncAction DeleteAsync()public IAsyncAction DeleteAsync()Public Function DeleteAsync() As IAsyncActionpublic IAsyncAction DeleteAsync()
Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

DeleteAsync(StorageDeleteOption) DeleteAsync(StorageDeleteOption) DeleteAsync(StorageDeleteOption) DeleteAsync(StorageDeleteOption)

Deletes a file, optionally moving the deleted file to the recycle bin.

public IAsyncAction DeleteAsync(StorageDeleteOption option)public IAsyncAction DeleteAsync(StorageDeleteOption option)Public Function DeleteAsync(option As StorageDeleteOption) As IAsyncActionpublic IAsyncAction DeleteAsync(StorageDeleteOption option)
Parameters
option
StorageDeleteOption StorageDeleteOption StorageDeleteOption StorageDeleteOption

A value that specifies whether the deleted file is moved to the recycle bin.

Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

GetBasicPropertiesAsync() GetBasicPropertiesAsync() GetBasicPropertiesAsync() GetBasicPropertiesAsync()

Retrieves the basic properties of the StorageFile.

public IAsyncOperation<BasicProperties> GetBasicPropertiesAsync()public IAsyncOperation<BasicProperties> GetBasicPropertiesAsync()Public Function GetBasicPropertiesAsync() As IAsyncOperation( Of BasicProperties )public IAsyncOperation<BasicProperties> GetBasicPropertiesAsync()
Returns

When this method completes successfully, it returns a BasicProperties object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

GetParentAsync() GetParentAsync() GetParentAsync() GetParentAsync()

Gets the parent folder of the current file.

public IAsyncOperation<StorageFolder> GetParentAsync()public IAsyncOperation<StorageFolder> GetParentAsync()Public Function GetParentAsync() As IAsyncOperation( Of StorageFolder )public IAsyncOperation<StorageFolder> GetParentAsync()
Returns

When this method completes, it returns the parent folder as a StorageFolder.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

GetThumbnailAsync(ThumbnailMode) GetThumbnailAsync(ThumbnailMode) GetThumbnailAsync(ThumbnailMode) GetThumbnailAsync(ThumbnailMode)

Retrieves the thumbnail that is associated with the StorageFile.

public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode)public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode)Public Function GetThumbnailAsync(mode As ThumbnailMode) As IAsyncOperation( Of StorageItemThumbnail )public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode)
Parameters
mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

The thumbnail mode to retrieve.

Returns

When this method completes successfully, it returns the thumbnail image as a StorageItemThumbnail object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

GetThumbnailAsync(ThumbnailMode, UInt32) GetThumbnailAsync(ThumbnailMode, UInt32) GetThumbnailAsync(ThumbnailMode, UInt32) GetThumbnailAsync(ThumbnailMode, UInt32)

Retrieves the thumbnail that is associated with the StorageFile, scaling it to the specified size.

public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, UInt32 requestedSize)public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, UInt32 requestedSize)Public Function GetThumbnailAsync(mode As ThumbnailMode, requestedSize As UInt32) As IAsyncOperation( Of StorageItemThumbnail )public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, UInt32 requestedSize)
Parameters
mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

The thumbnail mode to retrieve.

requestedSize
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The requested size in pixels of thumbnail to retrieve.

Returns

When this method completes successfully, it returns the thumbnail image as a StorageItemThumbnail object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions) GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions) GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions) GetThumbnailAsync(ThumbnailMode, UInt32, ThumbnailOptions)

Retrieves the thumbnail that is associated with the StorageFile, based on the specified options.

public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, UInt32 requestedSize, ThumbnailOptions options)public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, UInt32 requestedSize, ThumbnailOptions options)Public Function GetThumbnailAsync(mode As ThumbnailMode, requestedSize As UInt32, options As ThumbnailOptions) As IAsyncOperation( Of StorageItemThumbnail )public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, UInt32 requestedSize, ThumbnailOptions options)
Parameters
mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

The thumbnail mode to retrieve.

requestedSize
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The requested size in pixels of thumbnail to retrieve.

options
ThumbnailOptions ThumbnailOptions ThumbnailOptions ThumbnailOptions

The thumbnail retrieval options.

Returns

When this method completes successfully, it returns the thumbnail image as a StorageItemThumbnail object.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

IsEqual(IStorageItem) IsEqual(IStorageItem) IsEqual(IStorageItem) IsEqual(IStorageItem)

Indicates whether the current file is the same as the specified storage item.

public bool IsEqual(IStorageItem item)public bool IsEqual(IStorageItem item)Public Function IsEqual(item As IStorageItem) As boolpublic bool IsEqual(IStorageItem item)
Parameters
item
IStorageItem IStorageItem IStorageItem IStorageItem

The IStorageItem object that represents a storage item to compare against.

Returns
bool bool bool bool

Returns true if the current storage item is the same as the specified storage item; otherwise false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

IsOfType(StorageItemTypes) IsOfType(StorageItemTypes) IsOfType(StorageItemTypes) IsOfType(StorageItemTypes)

Determines whether the loaded StorageFile is the specified type.

public bool IsOfType(StorageItemTypes type)public bool IsOfType(StorageItemTypes type)Public Function IsOfType(type As StorageItemTypes) As boolpublic bool IsOfType(StorageItemTypes type)
Parameters
type
StorageItemTypes StorageItemTypes StorageItemTypes StorageItemTypes

The type of item to check against.

Returns
bool bool bool bool

True if the loaded StorageFile is the specified type; otherwise false.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

MoveAndReplaceAsync(IStorageFile) MoveAndReplaceAsync(IStorageFile) MoveAndReplaceAsync(IStorageFile) MoveAndReplaceAsync(IStorageFile)

Moves the current StorageFile from its location and uses it to replace the specified StorageFile.

public IAsyncAction MoveAndReplaceAsync(IStorageFile fileToReplace)public IAsyncAction MoveAndReplaceAsync(IStorageFile fileToReplace)Public Function MoveAndReplaceAsync(fileToReplace As IStorageFile) As IAsyncActionpublic IAsyncAction MoveAndReplaceAsync(IStorageFile fileToReplace)
Parameters
fileToReplace
IStorageFile IStorageFile IStorageFile IStorageFile

The StorageFile to be replaced.

Returns

An object for managing the asynchronous move and replace operation.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder) MoveAsync(IStorageFolder)

Moves the StorageFile to the specified StorageFolder.

public IAsyncAction MoveAsync(IStorageFolder destinationFolder)public IAsyncAction MoveAsync(IStorageFolder destinationFolder)Public Function MoveAsync(destinationFolder As IStorageFolder) As IAsyncActionpublic IAsyncAction MoveAsync(IStorageFolder destinationFolder)
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The destination folder.

Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String) MoveAsync(IStorageFolder, String)

Moves the StorageFile to the specified folder, and gives the file the specified file name.

public IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName)public IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName)Public Function MoveAsync(destinationFolder As IStorageFolder, desiredNewName As String) As IAsyncActionpublic IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName)
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The destination folder.

desiredNewName
System.String System.String System.String System.String

The new file name.

Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) MoveAsync(IStorageFolder, String, NameCollisionOption) 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.

public IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)public IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)Public Function MoveAsync(destinationFolder As IStorageFolder, desiredNewName As String, option As NameCollisionOption) As IAsyncActionpublic IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName, NameCollisionOption option)
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The destination folder.

desiredNewName
System.String System.String System.String System.String

The new file name.

option
NameCollisionOption NameCollisionOption NameCollisionOption NameCollisionOption

A value that indicates what to do if the file name already exists in the destination folder.

Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

OpenAsync(FileAccessMode) OpenAsync(FileAccessMode) OpenAsync(FileAccessMode) OpenAsync(FileAccessMode)

Opens a random-access stream with the specified options over the specified file.

public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode)public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode)Public Function OpenAsync(accessMode As FileAccessMode) As IAsyncOperation( Of IRandomAccessStream )public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode)
Parameters
accessMode
FileAccessMode FileAccessMode FileAccessMode FileAccessMode

One of the enumeration values that specifies the type of access to allow.

Returns

When this method completes, it returns an IRandomAccessStream that contains the requested random-access stream.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

OpenAsync(FileAccessMode, StorageOpenOptions) OpenAsync(FileAccessMode, StorageOpenOptions) OpenAsync(FileAccessMode, StorageOpenOptions) OpenAsync(FileAccessMode, StorageOpenOptions)

Opens a random-access stream with the specified options over the specified file.

public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode, StorageOpenOptions options)public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode, StorageOpenOptions options)Public Function OpenAsync(accessMode As FileAccessMode, options As StorageOpenOptions) As IAsyncOperation( Of IRandomAccessStream )public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode, StorageOpenOptions options)
Parameters
accessMode
FileAccessMode FileAccessMode FileAccessMode FileAccessMode

One of the enumeration values that specifies the type of access to allow.

options
StorageOpenOptions StorageOpenOptions StorageOpenOptions StorageOpenOptions

A bitwise combination of the enumeration values that specify options for opening the stream.

Returns

When this method completes, it returns an IRandomAccessStream that contains the requested random-access stream.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

OpenReadAsync() OpenReadAsync() OpenReadAsync() OpenReadAsync()

Opens a read-only, random-access stream over the StorageFile.

public IAsyncOperation<IRandomAccessStreamWithContentType> OpenReadAsync()public IAsyncOperation<IRandomAccessStreamWithContentType> OpenReadAsync()Public Function OpenReadAsync() As IAsyncOperation( Of IRandomAccessStreamWithContentType )public IAsyncOperation<IRandomAccessStreamWithContentType> OpenReadAsync()
Returns

When this method completes successfully, it returns a read-only, random-access stream (type IRandomAccessStreamWithContentType ).

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

OpenSequentialReadAsync() OpenSequentialReadAsync() OpenSequentialReadAsync() OpenSequentialReadAsync()

Opens a read-only, sequential-access stream over the StorageFile.

public IAsyncOperation<IInputStream> OpenSequentialReadAsync()public IAsyncOperation<IInputStream> OpenSequentialReadAsync()Public Function OpenSequentialReadAsync() As IAsyncOperation( Of IInputStream )public IAsyncOperation<IInputStream> OpenSequentialReadAsync()
Returns

When this method completes successfully, it returns a read-only, sequential-access stream (type IInputStream ).

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

OpenTransactedWriteAsync() OpenTransactedWriteAsync() OpenTransactedWriteAsync() OpenTransactedWriteAsync()

Opens a random-access stream to the file that can be used for transacted-write operations.

public IAsyncOperation<StorageStreamTransaction> OpenTransactedWriteAsync()public IAsyncOperation<StorageStreamTransaction> OpenTransactedWriteAsync()Public Function OpenTransactedWriteAsync() As IAsyncOperation( Of StorageStreamTransaction )public IAsyncOperation<StorageStreamTransaction> OpenTransactedWriteAsync()
Returns

When this method completes, it returns a StorageStreamTransaction that contains the random-access stream and methods that can be used to complete transactions.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

OpenTransactedWriteAsync(StorageOpenOptions) OpenTransactedWriteAsync(StorageOpenOptions) OpenTransactedWriteAsync(StorageOpenOptions) OpenTransactedWriteAsync(StorageOpenOptions)

Opens a random-access stream to the file that can be used for transacted-write operations with the specified options.

public IAsyncOperation<StorageStreamTransaction> OpenTransactedWriteAsync(StorageOpenOptions options)public IAsyncOperation<StorageStreamTransaction> OpenTransactedWriteAsync(StorageOpenOptions options)Public Function OpenTransactedWriteAsync(options As StorageOpenOptions) As IAsyncOperation( Of StorageStreamTransaction )public IAsyncOperation<StorageStreamTransaction> OpenTransactedWriteAsync(StorageOpenOptions options)
Parameters
options
StorageOpenOptions StorageOpenOptions StorageOpenOptions StorageOpenOptions

A bitwise combination of the enumeration values that specify options for opening the stream.

Returns

When this method completes, it returns a StorageStreamTransaction that contains the random-access stream and methods that can be used to complete transactions.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

RenameAsync(String) RenameAsync(String) RenameAsync(String) RenameAsync(String)

Renames the StorageFile.

public IAsyncAction RenameAsync(String desiredName)public IAsyncAction RenameAsync(String desiredName)Public Function RenameAsync(desiredName As String) As IAsyncActionpublic IAsyncAction RenameAsync(String desiredName)
Parameters
desiredName
System.String System.String System.String System.String

The new name.

Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

RenameAsync(String, NameCollisionOption) RenameAsync(String, NameCollisionOption) RenameAsync(String, NameCollisionOption) RenameAsync(String, NameCollisionOption)

Renames the StorageFile, and specifies what to do if a file with the same name already exists in the current folder.

public IAsyncAction RenameAsync(String desiredName, NameCollisionOption option)public IAsyncAction RenameAsync(String desiredName, NameCollisionOption option)Public Function RenameAsync(desiredName As String, option As NameCollisionOption) As IAsyncActionpublic IAsyncAction RenameAsync(String desiredName, NameCollisionOption option)
Parameters
desiredName
System.String System.String System.String System.String

The new name.

option
NameCollisionOption NameCollisionOption NameCollisionOption NameCollisionOption

A value that indicates what to do if the file name already exists in the current folder.

Returns

No object or value is returned when this method completes.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Events

PropertiesUpdated PropertiesUpdated PropertiesUpdated PropertiesUpdated

Occurs when one or more of the StorageFile 's properties is updated.

public event TypedEventHandler PropertiesUpdatedpublic event TypedEventHandler PropertiesUpdatedPublic Event PropertiesUpdatedpublic event TypedEventHandler PropertiesUpdated
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ThumbnailUpdated ThumbnailUpdated ThumbnailUpdated ThumbnailUpdated

Fires when the StorageFile 's thumbnail is updated or a better quality thumbnail is available.

public event TypedEventHandler ThumbnailUpdatedpublic event TypedEventHandler ThumbnailUpdatedPublic Event ThumbnailUpdatedpublic event TypedEventHandler ThumbnailUpdated
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)