Click or drag to resize
GDStorageFolderCreateFolderAsync Method (String)
Creates a new subfolder with the specified name in the current folder.

Namespace:  GD
Assembly:  GD (in GD.dll) Version: 255.255.255.255
Syntax
public IAsyncOperation<GDStorageFolder> CreateFolderAsync(
	string desiredName
)

Parameters

desiredName
Type: SystemString
The name of the new folder to create in the current folder.

Return Value

Type: IAsyncOperationGDStorageFolder
When this method completes, it returns a GDStorageFolder that represents the new subfolder.

Implements

IGDStorageFolderCreateFolderAsync(String)
Exceptions
ExceptionCondition
ExceptionA folder with the specified desiredName already exists in the current folder or some unexpected error occurred.
AccessDeniedExceptionSecure storage was remotely wiped.
InvalidArgumentExceptionThe folder name contains invalid characters, or the format of the folder name is incorrect. Check the value of desiredName.
Remarks

This method uses the FailIfExists value from the CreationCollisionOption enumeration by default. That is, this method raises an exception if a subfolder with the same name already exists in the current folder. If you want to handle a folder name collision in a different way, call the CreateFolderAsync(String, CreationCollisionOption) method.

If you try to create a subfolder in a folder that represents a container for a group of files (for example, the return value from some overloads of the GetFoldersAsync method), the CreateFolderAsync(String) method may fail.

Note: No leading nor trailing spaces are stripped from desiredName.

Examples
The following example shows how to create a new subfolder in a SDK secure folder.
using GD;

var secureSubfolder = await GDWindows.Instance.SecureFolder.CreateFolderAsync("SubFolder");
See Also