共用方式為


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

另請參閱

適用於