GetFolderAsync | getFolderAsync method
TOC
Collapse the table of content
Expand the table of content

StorageFolder.GetFolderAsync | getFolderAsync method

Gets the subfolder with the specified name from the current folder.

Syntax


Public Function GetFolderAsync(
  name As String 
) As IAsyncOperation(Of StorageFolder)

Parameters

name

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

The name (or path relative to the current folder) of the subfolder to get.

Return value

Type: IAsyncOperation<StorageFolder>

When this method completes successfully, it returns a StorageFolder that represents the specified subfolder.

Exceptions

ExceptionCondition
System.IO.FileNotFoundException

The specified folder does not exist. Check the value of name.

System.UnauthorizedAccessException

You don't have permission to access the specified folder.

System.ArgumentException

The path cannot be in Uri format (for example, /Assets). Check the value of name.

Examples

The following example shows how to get a subfolder from the current folder by calling the GetFolderAsync method. This example also shows how to get a subfolder from a subfolder of the current folder by providing a relative path.

No code example is currently available or this language may not be supported.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

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

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

StorageFolder
GetItemAsync

 

 

Show:
© 2016 Microsoft