Joins base with a single path segment taken from an untrusted source (e.g., a file name, release tag, or hash read
from a downloaded or project-supplied file), refusing every segment that could name anything outside base.
Parameters
base: string
segment: string
Returns string
Throws
if the segment is empty, . or .., or contains a path separator or NUL
Joins
basewith a single path segment taken from an untrusted source (e.g., a file name, release tag, or hash read from a downloaded or project-supplied file), refusing every segment that could name anything outsidebase.