Table of Contents

Method SelectFolderIfExists

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SelectFolderIfExists(string?)

Selects the specified folder if it exists, or selects the folder containing the specified file if applicable.

public virtual void SelectFolderIfExists(string? folder)

Parameters

folder string

The path to the folder or file. If the path is null or empty, the selected folder is set to null. If the path is a valid directory, it becomes the selected folder. If the path is a valid file, the directory containing the file becomes the selected folder.

Remarks

If neither the specified folder nor the containing folder of the specified file exists, an initial folder is selected.