Jaa


DownloadsFolder.CreateFolderAsync Method

Definition

Overloads

CreateFolderAsync(String)

Creates a new subfolder in the Downloads folder.

CreateFolderAsync(String, CreationCollisionOption)

Creates a new subfolder in the Downloads folder, and specifies what to do if a subfolder with the same name already exists in the Downloads folder.

CreateFolderAsync(String)

Creates a new subfolder in the Downloads folder.

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

Parameters

desiredName
String

Platform::String

winrt::hstring

The desired name of the subfolder to create.

If a subfolder with the specified name already exists, a similar but unique name will be used. For example, if desiredName is "MyFolder" and a subfolder by that name already exists in the Downloads folder, the new subfolder will be created with a name like "MyFolder (1)" instead.

Returns

When this method completes, it returns the new subfolder as a StorageFolder.

Attributes

See also

Applies to

CreateFolderAsync(String, CreationCollisionOption)

Creates a new subfolder in the Downloads folder, and specifies what to do if a subfolder with the same name already exists in the Downloads folder.

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

Parameters

desiredName
String

Platform::String

winrt::hstring

The desired name of the subfolder to create.

If there is an existing subfolder in the Downloads folder that already has the specified desiredName, the specified CreationCollisionOption determines how Windows responds to the conflict.

option
CreationCollisionOption

The enum value that determines how Windows responds if the desiredName is the same as the name of an existing subfolder in the Downloads folder.

Because the app can only access folders in the Downloads folder that it created, you can't specify OpenIfExists or ReplaceExisting for this parameter.

Returns

When this method completes, it returns the new subfolder as a StorageFolder.

Attributes

See also

Applies to