vigiles API reference
    Preparing search index...

    Interface PathView

    An AST-free view of a file path — the matching primitive for file tools.

    interface PathView {
        raw: string;
        rel: string | undefined;
        under(prefixes: readonly string[]): boolean;
    }
    Index

    Properties

    Methods

    Properties

    raw: string
    rel: string | undefined

    The path as a repo-relative reference, or undefined when this view cannot produce one — an absolute path with no known root, or a path that resolves OUTSIDE the root (/etc/passwd, a sibling checkout). Exposed because a hook that wants to report or re-match the path needs the same answer under used, and raw alone does not carry it.

    Methods

    • True iff the path sits under at least one allowed prefix (e.g. "src/**").

      A prefix is matched in ITS OWN spelling: a repo-relative prefix ("src", "drafts/papers/") is compared against the path made repo-relative, an absolute prefix ("/etc") against the path made absolute. Which of those is available depends on the project root — see pathView.

      Parameters

      • prefixes: readonly string[]

      Returns boolean