FolderInformation.CreateFolderAsync 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
CreateFolderAsync(String) |
建立目前資料夾的新子資料夾。 |
CreateFolderAsync(String, CreationCollisionOption) |
建立目前資料夾的新子資料夾,並指定如果目前資料夾中已有相同名稱的資料夾,該怎麼辦。 |
建立目前資料夾的新子資料夾。
public:
virtual IAsyncOperation<StorageFolder ^> ^ CreateFolderAsync(Platform::String ^ desiredName) = CreateFolderAsync;
/// [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 。
實作
M:Windows.Storage.IStorageFolder.CreateFolderAsync(System.String)
M:Windows.Storage.IStorageFolder.CreateFolderAsync(Platform::String)
M:Windows.Storage.IStorageFolder.CreateFolderAsync(winrt::hstring)
- 屬性
另請參閱
適用於
WinRT Build 26100 及其他版本
產品 | 版本 |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |
建立目前資料夾的新子資料夾,並指定如果目前資料夾中已有相同名稱的資料夾,該怎麼辦。
public:
virtual IAsyncOperation<StorageFolder ^> ^ CreateFolderAsync(Platform::String ^ desiredName, CreationCollisionOption options) = CreateFolderAsync;
/// [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
新資料夾的名稱。
- options
- CreationCollisionOption
值,指出如果子資料夾已存在於目前資料夾中,該怎麼辦。
傳回
當這個方法成功完成時,它會傳回代表新檔案的 StorageFolder 。
實作
M:Windows.Storage.IStorageFolder.CreateFolderAsync(System.String,Windows.Storage.CreationCollisionOption)
M:Windows.Storage.IStorageFolder.CreateFolderAsync(Platform::String,Windows.Storage.CreationCollisionOption)
M:Windows.Storage.IStorageFolder.CreateFolderAsync(winrt::hstring,Windows.Storage.CreationCollisionOption)
- 屬性
另請參閱
適用於
WinRT Build 26100 及其他版本
產品 | 版本 |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |