Lumaktaw patungo sa pangunahing content

resolvePathUnder

Callable

  • resolvePathUnder(path: string, parentPath: string): string

  • Resolves a path and returns it only when it stays under a parent path.

    Absolute paths are checked as-is. Relative paths are resolved from the parent path. The parent itself is not considered to be under the parent. Paths containing null bytes are rejected before resolution.


    Parameters

    • path: string

      The absolute or relative path to resolve.

    • parentPath: string

      The path the result must stay under.

    Returns string

    The normalized resolved path, or undefined when it is not a child.