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 FileInformation : IStorageItemInformation, IStorageFile, IStorageFile2, IStorageFilePropertiesWithAvailability, IStorageItem, IStorageItem2, IStorageItemProperties, IStorageItemPropertiesWithProvider, IInputStreamReference, IRandomAccessStreamReferencepublic sealed class FileInformation : IStorageItemInformation, IStorageFile, IStorageFile2, IStorageFilePropertiesWithAvailability, IStorageItem, IStorageItem2, IStorageItemProperties, IStorageItemPropertiesWithProvider, IInputStreamReference, IRandomAccessStreamReferencePublic NotInheritable Class FileInformation Implements IStorageItemInformation, IStorageFile, IStorageFile2, IStorageFilePropertiesWithAvailability, IStorageItem, IStorageItem2, IStorageItemProperties, IStorageItemPropertiesWithProvider, IInputStreamReference, IRandomAccessStreamReference// You can use this class in JavaScript.
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 fileInformationFactory.getFilesAsync 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 FileAttributes// You can use this property in JavaScript.

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 BasicProperties// You can use this property in JavaScript.
Value
BasicProperties BasicProperties BasicProperties BasicProperties

The basic properties object.

ContentType ContentType ContentType ContentType

Gets a string that describes the contents of the file.

public : PlatForm::String ContentType { get; }public string ContentType { get; }Public ReadOnly Property ContentType As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The content type string.

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 DateTimeOffset// You can use this property in JavaScript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The file creation date.

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 : PlatForm::String DisplayName { get; }public string DisplayName { get; }Public ReadOnly Property DisplayName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The user-friendly name of the StorageFile.

DisplayType DisplayType DisplayType DisplayType

Gets the display type of the StorageFile.

public : PlatForm::String DisplayType { get; }public string DisplayType { get; }Public ReadOnly Property DisplayType As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The display type.

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 DocumentProperties// You can use this property in JavaScript.

FileType FileType FileType FileType

Gets the file type.

public : PlatForm::String FileType { get; }public string FileType { get; }Public ReadOnly Property FileType As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The file type.

FolderRelativeId FolderRelativeId FolderRelativeId FolderRelativeId

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

public : PlatForm::String FolderRelativeId { get; }public string FolderRelativeId { get; }Public ReadOnly Property FolderRelativeId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The folder-relative identifier.

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 ImageProperties// You can use this property in JavaScript.

IsAvailable IsAvailable IsAvailable IsAvailable

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

public : PlatForm::Boolean IsAvailable { get; }public bool IsAvailable { get; }Public ReadOnly Property IsAvailable As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

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

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 MusicProperties// You can use this property in JavaScript.

Name Name Name Name

Gets the name of the StorageFile.

public : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The name.

Path Path Path Path

Gets the path of the StorageFile.

public : PlatForm::String Path { get; }public string Path { get; }Public ReadOnly Property Path As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The path.

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 StorageItemContentProperties// You can use this property in JavaScript.

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 StorageProvider// You can use this property in JavaScript.
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.

Thumbnail Thumbnail Thumbnail Thumbnail

Gets the thumbnail associated with the StorageFile.

public : StorageItemThumbnail Thumbnail { get; }public StorageItemThumbnail Thumbnail { get; }Public ReadOnly Property Thumbnail As StorageItemThumbnail// You can use this property in JavaScript.

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 VideoProperties// You can use this property in JavaScript.

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 IAsyncAction// You can use this method in JavaScript.
Parameters
fileToReplace
IStorageFile IStorageFile IStorageFile IStorageFile

The StorageFile to be replaced.

Returns

No object or value is returned when this method completes.

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 )// You can use this method in JavaScript.
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The folder in which to store the copied file.

Returns
See Also

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, PlatForm::String desiredNewName)public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, String desiredNewName)Public Function CopyAsync(destinationFolder As IStorageFolder, desiredNewName As String) As IAsyncOperation( Of StorageFile )// You can use this method in JavaScript.
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The folder in which to store the copied file.

desiredNewName
PlatForm::String String String String

The name of the new copy.

Returns
See Also

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, PlatForm::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 )// You can use this method in JavaScript.
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The folder in which to store the copied file.

desiredNewName
PlatForm::String String String 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
See Also

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

Deletes a file.

public : IAsyncAction DeleteAsync()public IAsyncAction DeleteAsync()Public Function DeleteAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

No object or value is returned when this method completes.

See Also

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 IAsyncAction// You can use this method in JavaScript.
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.

See Also

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 )// You can use this method in JavaScript.
Returns
See Also

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 )// You can use this method in JavaScript.
Returns

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 )// You can use this method in JavaScript.
Parameters
mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

The thumbnail mode to retrieve.

Returns
See Also

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, unsigned int requestedSize)public IAsyncOperation<StorageItemThumbnail> GetThumbnailAsync(ThumbnailMode mode, UInt32 requestedSize)Public Function GetThumbnailAsync(mode As ThumbnailMode, requestedSize As UInt32) As IAsyncOperation( Of StorageItemThumbnail )// You can use this method in JavaScript.
Parameters
mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

The thumbnail mode to retrieve.

requestedSize
unsigned int UInt32 UInt32 UInt32

The requested size in pixels of thumbnail to retrieve.

Returns
See Also

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, unsigned int 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 )// You can use this method in JavaScript.
Parameters
mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

The thumbnail mode to retrieve.

requestedSize
unsigned int UInt32 UInt32 UInt32

The requested size in pixels of thumbnail to retrieve.

options
ThumbnailOptions ThumbnailOptions ThumbnailOptions ThumbnailOptions

The thumbnail retrieval options.

Returns
See Also

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

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

public : PlatForm::Boolean IsEqual(IStorageItem item)public bool IsEqual(IStorageItem item)Public Function IsEqual(item As IStorageItem) As bool// You can use this method in JavaScript.
Parameters
item
IStorageItem IStorageItem IStorageItem IStorageItem

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

Returns
PlatForm::Boolean bool bool bool

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

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

Determines whether the loaded StorageFile is the specified type.

public : PlatForm::Boolean IsOfType(StorageItemTypes type)public bool IsOfType(StorageItemTypes type)Public Function IsOfType(type As StorageItemTypes) As bool// You can use this method in JavaScript.
Parameters
type
StorageItemTypes StorageItemTypes StorageItemTypes StorageItemTypes

The type of item to check against.

Returns
PlatForm::Boolean bool bool bool

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

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 IAsyncAction// You can use this method in JavaScript.
Parameters
fileToReplace
IStorageFile IStorageFile IStorageFile IStorageFile

The StorageFile to be replaced.

Returns

An object for managing the asynchronous move and replace operation.

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 IAsyncAction// You can use this method in JavaScript.
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The destination folder.

Returns

No object or value is returned when this method completes.

See Also

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, PlatForm::String desiredNewName)public IAsyncAction MoveAsync(IStorageFolder destinationFolder, String desiredNewName)Public Function MoveAsync(destinationFolder As IStorageFolder, desiredNewName As String) As IAsyncAction// You can use this method in JavaScript.
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The destination folder.

desiredNewName
PlatForm::String String String String

The new file name.

Returns

No object or value is returned when this method completes.

See Also

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, PlatForm::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 IAsyncAction// You can use this method in JavaScript.
Parameters
destinationFolder
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The destination folder.

desiredNewName
PlatForm::String String String 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.

See Also

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 )// You can use this method in JavaScript.
Parameters
accessMode
FileAccessMode FileAccessMode FileAccessMode FileAccessMode

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

Returns
See Also

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 )// You can use this method in JavaScript.
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
See Also

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 )// You can use this method in JavaScript.
Returns

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 )// You can use this method in JavaScript.
Returns

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

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 )// You can use this method in JavaScript.
Returns

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

See Also

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 )// You can use this method in JavaScript.
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.

See Also

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

Renames the StorageFile.

public : IAsyncAction RenameAsync(PlatForm::String desiredName)public IAsyncAction RenameAsync(String desiredName)Public Function RenameAsync(desiredName As String) As IAsyncAction// You can use this method in JavaScript.
Parameters
desiredName
PlatForm::String String String String

The new name.

Returns

No object or value is returned when this method completes.

See Also

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(PlatForm::String desiredName, NameCollisionOption option)public IAsyncAction RenameAsync(String desiredName, NameCollisionOption option)Public Function RenameAsync(desiredName As String, option As NameCollisionOption) As IAsyncAction// You can use this method in JavaScript.
Parameters
desiredName
PlatForm::String String String 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.

See Also

Events

PropertiesUpdated PropertiesUpdated PropertiesUpdated PropertiesUpdated

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

public : event TypedEventHandler PropertiesUpdated<IStorageItemInformation,  object>public event TypedEventHandler PropertiesUpdated<IStorageItemInformation,  object>Public Event PropertiesUpdated<IStorageItemInformation,  object>// You can use this event in JavaScript.

ThumbnailUpdated ThumbnailUpdated ThumbnailUpdated ThumbnailUpdated

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

public : event TypedEventHandler ThumbnailUpdated<IStorageItemInformation,  object>public event TypedEventHandler ThumbnailUpdated<IStorageItemInformation,  object>Public Event ThumbnailUpdated<IStorageItemInformation,  object>// You can use this event in JavaScript.

See Also