Delen via


FileInformation.RenameAsync Method

Definition

Overloads

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.

RenameAsync(String)

Renames the StorageFile.

public:
 virtual IAsyncAction ^ RenameAsync(Platform::String ^ desiredName) = RenameAsync;
/// [Windows.Foundation.Metadata.Overload("RenameAsyncOverloadDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction RenameAsync(winrt::hstring const& desiredName);
[Windows.Foundation.Metadata.Overload("RenameAsyncOverloadDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction RenameAsync(string desiredName);
function renameAsync(desiredName)
Public Function RenameAsync (desiredName As String) As IAsyncAction

Parameters

desiredName
String

Platform::String

winrt::hstring

The new name.

Returns

No object or value is returned when this method completes.

Implements

M:Windows.Storage.IStorageItem.RenameAsync(System.String) M:Windows.Storage.IStorageItem.RenameAsync(Platform::String) M:Windows.Storage.IStorageItem.RenameAsync(winrt::hstring)
Attributes

See also

Applies to

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:
 virtual IAsyncAction ^ RenameAsync(Platform::String ^ desiredName, NameCollisionOption option) = RenameAsync;
/// [Windows.Foundation.Metadata.Overload("RenameAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction RenameAsync(winrt::hstring const& desiredName, NameCollisionOption const& option);
[Windows.Foundation.Metadata.Overload("RenameAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction RenameAsync(string desiredName, NameCollisionOption option);
function renameAsync(desiredName, option)
Public Function RenameAsync (desiredName As String, option As NameCollisionOption) As IAsyncAction

Parameters

desiredName
String

Platform::String

winrt::hstring

The new name.

option
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.

Implements

M:Windows.Storage.IStorageItem.RenameAsync(System.String,Windows.Storage.NameCollisionOption) M:Windows.Storage.IStorageItem.RenameAsync(Platform::String,Windows.Storage.NameCollisionOption) M:Windows.Storage.IStorageItem.RenameAsync(winrt::hstring,Windows.Storage.NameCollisionOption)
Attributes

See also

Applies to