Skip to content
ConsoleMonster

API Reference

Class

PathPrompt

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Base Prompt<String>
Modifiers sealed

A file or folder path with completion: matching entries of the typed folder are listed under the box (folders first), Tab completes the common part or the focused entry, Up/Down move through the suggestions, and Enter checks that the path exists and is the right kind when required.

Inheritance

  • Prompt<String>
  • PathPrompt

Constructors

public PathPrompt(String title) #

Creates a path prompt.

Parameters

title System.String requiredposition: 0
The question.

Methods

public override String Describe(String value) #
Returns: String

The answer as text, for the summary line left in the scrollback.

Parameters

value System.String requiredposition: 0
The answer.

Returns

The text.

Properties

public PathKind Kind { get; set; } #

What is accepted.

public Boolean MustExist { get; set; } #

Whether the path must exist.

public String? BasePath { get; set; } #

The folder relative paths start from; null uses the current directory.

public IList<String> Extensions { get; } #

File extensions offered as suggestions (".csv", ".json"); empty offers every file.

public Boolean ShowHidden { get; set; } #

Whether hidden entries are suggested.

public Int32 Suggestions { get; set; } #

How many suggestions are listed.