Skip to content

PathChecks ​

Filesystem expectations attached by flag.path() and arg.path().

Checked after resolution (not during parse) via the runtime adapter, so src/core stays free of platform I/O and every resolved value is validated whichever source produced it, defaults included.

Signatures ​

ts
interface PathChecks {}

Members ​

Properties ​

create ​

Create the directory (recursively) when nothing exists at the path.

ts
create: boolean;

mustExist ​

Reject the value if nothing exists at the path.

ts
mustExist: boolean;

type ​

Require the existing path to be a file or a directory. Implies existence when set, unless mustExist is false.

ts
type: "file" | "directory" | undefined;

See Also ​

Released under the MIT License.