KetraTerm
API · DevelopmentAll versions

TerminalBoundedDirectoryScanner

Time- and visit-bounded local directory scanner.

Parameters

maxVisitedEntries

positive cap on inspected direct children.

scanBudgetNanos

positive best-effort monotonic scan budget.

ioDispatcher

dispatcher used only for blocking filesystem access.

Throws

if a capacity or the scan budget is not positive.

Constructors

Link copied to clipboard
constructor(maxVisitedEntries: Int = DEFAULT_MAX_VISITED_ENTRIES, scanBudgetNanos: Long = TimeUnit.MILLISECONDS.toNanos(DEFAULT_SCAN_BUDGET_MILLIS), ioDispatcher: CoroutineDispatcher = Dispatchers.IO)

Configures scan limits and blocking I/O execution using the JVM monotonic clock.

Functions

Link copied to clipboard
open suspend override fun scan(directory: Path, entryNamePrefix: String): List<TerminalFileEntry>

Returns a bounded deterministic snapshot.