Udostępnij za pośrednictwem


Launcher.LaunchFolderPathForUserAsync Method

Definition

Overloads

LaunchFolderPathForUserAsync(User, String)

Launches File Explorer and displays the contents of the specified folder.

LaunchFolderPathForUserAsync(User, String, FolderLauncherOptions)

Launches File Explorer with the specified options and displays the contents of the specified folder.

LaunchFolderPathForUserAsync(User, String)

Launches File Explorer and displays the contents of the specified folder.

public:
 static IAsyncOperation<bool> ^ LaunchFolderPathForUserAsync(User ^ user, Platform::String ^ path);
/// [Windows.Foundation.Metadata.Overload("LaunchFolderPathForUserAsync")]
 static IAsyncOperation<bool> LaunchFolderPathForUserAsync(User const& user, winrt::hstring const& path);
[Windows.Foundation.Metadata.Overload("LaunchFolderPathForUserAsync")]
public static IAsyncOperation<bool> LaunchFolderPathForUserAsync(User user, string path);
function launchFolderPathForUserAsync(user, path)
Public Shared Function LaunchFolderPathForUserAsync (user As User, path As String) As IAsyncOperation(Of Boolean)

Parameters

user
User

The user context to pass to the launched app.

path
String

Platform::String

winrt::hstring

A filepath to the folder to open.

Returns

The result of the operation.

Attributes

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

This API must be called from within an ASTA thread (also known as a UI thread). This API does not require the calling app to have access to the folder being launched. This API will fail if the path does not point to a folder, or the user does not have access to that folder.

See also

Applies to

LaunchFolderPathForUserAsync(User, String, FolderLauncherOptions)

Launches File Explorer with the specified options and displays the contents of the specified folder.

public:
 static IAsyncOperation<bool> ^ LaunchFolderPathForUserAsync(User ^ user, Platform::String ^ path, FolderLauncherOptions ^ options);
/// [Windows.Foundation.Metadata.Overload("LaunchFolderPathWithOptionsForUserAsync")]
 static IAsyncOperation<bool> LaunchFolderPathForUserAsync(User const& user, winrt::hstring const& path, FolderLauncherOptions const& options);
[Windows.Foundation.Metadata.Overload("LaunchFolderPathWithOptionsForUserAsync")]
public static IAsyncOperation<bool> LaunchFolderPathForUserAsync(User user, string path, FolderLauncherOptions options);
function launchFolderPathForUserAsync(user, path, options)
Public Shared Function LaunchFolderPathForUserAsync (user As User, path As String, options As FolderLauncherOptions) As IAsyncOperation(Of Boolean)

Parameters

user
User

The user context to pass to the launched app.

path
String

Platform::String

winrt::hstring

A filepath to the folder to open.

options
FolderLauncherOptions

Options that specify the amount of screen space that File Explorer fills, and the list of items to select in the specified folder.

Returns

The result of the operation.

Attributes

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

This API must be called from within an ASTA thread (also known as a UI thread). This API does not require the calling app to have access to the folder being launched. This API will fail if the path does not point to a folder, or the user does not have access to that folder.

See also

Applies to