Windows Dev Center

DownloadsFolder.CreateFolderAsync(String) | createFolderAsync(String) method

Creates a new subfolder in the Downloads folder.

Syntax


Windows.Storage.DownloadsFolder.createFolderAsync(desiredName).done( /* Your success and error handlers */ );

Parameters

desiredName

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

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.

Return value

Type: IAsyncOperation<StorageFolder>

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

Remarks

All apps automatically have permission to create subfolders in the Downloads folder. No capability is needed. Learn more about capabilities in Access to user resources using the Windows Runtime.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.winmd

See also

DownloadsFolder
CreateFolderAsync(String, CreationCollisionOption)

 

 

Show:
© 2015 Microsoft