Package-level declarations
Types
Reason why cleaning a directory is refused for safety. Combined with --clean, accidental targeting of a sensitive directory could result in irreversible data loss, so the CLI refuses any of these cases up front.
Simple immutable stopwatch to measure elapsed time in milliseconds.
Functions
Decides whether this directory can be safely wiped by the CLI --clean flag.
Cleans this directory by deleting all files and directories inside it. Does nothing if the directory is empty or if the file does not exist or is not a directory.
Like Clikt's prompt, but the prompt is skipped when fallback yields a value, which is then used as if the user had passed it. Resolution order: the value given on the command line, then fallback, then the interactive prompt. The typed answer, as well as default, goes through the option's own conversion, so validation and error messages match the command-line form; an invalid answer is asked again. A closed input yields default. Like Clikt's prompt, no prompt is shown once another parameter has already failed.
Runs action with an optional timeout. If timeoutSeconds is null or non-positive, action is executed directly on the current thread. Otherwise, it is submitted and bounded by the given duration.