FolderInformation.RenameAsync 方法

定义

重载

RenameAsync(String)

重命名 StorageFolder

RenameAsync(String, NameCollisionOption)

重命名 StorageFolder,并指定在已存在同名文件夹时要执行的操作。

RenameAsync(String)

重命名 StorageFolder

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

参数

desiredName
String

Platform::String

winrt::hstring

新名称。

返回

此方法完成后,不会返回任何对象或值。

实现

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

另请参阅

适用于

RenameAsync(String, NameCollisionOption)

重命名 StorageFolder,并指定在已存在同名文件夹时要执行的操作。

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

参数

desiredName
String

Platform::String

winrt::hstring

新名称。

option
NameCollisionOption

一个 值,该值指示在具有 desiredName 的文件夹已存在时要执行的操作。

返回

此方法完成后,不会返回任何对象或值。

实现

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)
属性

另请参阅

适用于