Table of Contents

Interface IFolderBrowser

Namespace
ItTiger.TigerCli.Tui.Abstractions
Assembly
ItTiger.TigerCli.dll
Filesystem navigation policy used by InlineFolderSelect. The control is agnostic to the underlying filesystem and platform; all platform rules (drive lists, root behavior, parent resolution) and all error handling live behind this abstraction.
public interface IFolderBrowser

Remarks

Implementations must be exception-safe: inaccessible, missing, or transiently failing locations must surface as an empty entry list (or HasChildren = false), never as a thrown exception.

Properties

RootLocation

The conceptual top location. On Windows this is null (a synthetic drive list); on Unix this is "/". Used as the fallback target for unresolvable initial paths.
string? RootLocation { get; }

Property Value

string

Methods

GetEntries(string?)

Lists the selectable folder rows at location. A null location means the Windows drive list. Returns an empty list when the location is unreadable.
IReadOnlyList<FolderEntry> GetEntries(string? location)

Parameters

location string

Returns

IReadOnlyList<FolderEntry>

ResolveInitial(string?)

Resolves a caller-supplied initial path into a starting location and the path that should be highlighted within that location. When the path cannot be found or read, falls back to the closest readable ancestor, and ultimately to RootLocation with no specific highlight.
(string? location, string? highlightPath) ResolveInitial(string? initialPath)

Parameters

initialPath string

Returns

(string location, string highlightPath)

TryGetParent(string?, out string?)

Computes the parent location to navigate to from location. Returns false when already at the top (the Windows drive list, or Unix "/"), in which case no upward navigation occurs. When it returns true, parent is the parent location (which may be null to return to the Windows drive list).
bool TryGetParent(string? location, out string? parent)

Parameters

location string
parent string

Returns

bool