IStorageFolder.CreateFolderAsync 方法

定義

多載

CreateFolderAsync(String)

在目前資料夾中建立新的資料夾。

CreateFolderAsync(String, CreationCollisionOption)

在目前資料夾中建立新的資料夾,並指定如果目前資料夾中已有相同名稱的資料夾,該怎麼做。

CreateFolderAsync(String)

在目前資料夾中建立新的資料夾。

public:
 IAsyncOperation<StorageFolder ^> ^ CreateFolderAsync(Platform::String ^ desiredName);
/// [Windows.Foundation.Metadata.Overload("CreateFolderAsyncOverloadDefaultOptions")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageFolder> CreateFolderAsync(winrt::hstring const& desiredName);
[Windows.Foundation.Metadata.Overload("CreateFolderAsyncOverloadDefaultOptions")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageFolder> CreateFolderAsync(string desiredName);
function createFolderAsync(desiredName)
Public Function CreateFolderAsync (desiredName As String) As IAsyncOperation(Of StorageFolder)

參數

desiredName
String

Platform::String

winrt::hstring

要建立之資料夾的所需名稱。

傳回

當這個方法完成時,它會以 StorageFolder的形式傳回新的資料夾。

屬性

另請參閱

適用於

CreateFolderAsync(String, CreationCollisionOption)

在目前資料夾中建立新的資料夾,並指定如果目前資料夾中已有相同名稱的資料夾,該怎麼做。

public:
 IAsyncOperation<StorageFolder ^> ^ CreateFolderAsync(Platform::String ^ desiredName, CreationCollisionOption options);
/// [Windows.Foundation.Metadata.Overload("CreateFolderAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<StorageFolder> CreateFolderAsync(winrt::hstring const& desiredName, CreationCollisionOption const& options);
[Windows.Foundation.Metadata.Overload("CreateFolderAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<StorageFolder> CreateFolderAsync(string desiredName, CreationCollisionOption options);
function createFolderAsync(desiredName, options)
Public Function CreateFolderAsync (desiredName As String, options As CreationCollisionOption) As IAsyncOperation(Of StorageFolder)

參數

desiredName
String

Platform::String

winrt::hstring

要建立之資料夾的所需名稱。

如果目前資料夾中的現有資料夾已經有指定的 desiredName,則指定的 CreationCollisionOption 會決定 Windows 如何回應衝突。

options
CreationCollisionOption

列舉值,決定 如果 desiredName 與目前資料夾中現有資料夾的名稱相同,Windows 會如何回應。

傳回

當這個方法完成時,它會以 StorageFolder的形式傳回新的資料夾。

屬性

另請參閱

適用於