ADK for TypeScript: API Reference
    Preparing search index...

    Function validatePathSegment

    • Validates that a caller-supplied identifier is a safe single path segment and cannot traverse directories.

      This is a lexical check on the string only. It does not resolve symlinks and is not a sandbox.

      Parameters

      • value: string

        The caller-supplied identifier. Non-string values are rejected.

      • fieldName: string

        Human-readable field name used in error messages.

      Returns void

      If value is not a non-empty string, or if it contains a null byte, a path separator, a drive prefix, or is . or ...