src/vs/base/common/glob.ts/trivia4and5
function trivia4and5(targetPath: string, pattern: string, matchPathEnds: boolean): ParsedStringPattern {
	const usingPosixSep = paths.sep === paths.posix.sep;
	const nativePath = usingPosixSep ? targetPath : targetPath.replace(ALL_FORWARD_SLASHES, paths.sep);
	const nativePathEnd = paths.sep + nativePath;
	const targetPathEnd = paths.posix.sep + targetPath;

	const parsedPattern: ParsedStringPattern = matchPathEnds ? function (testPath, basename) {
		return typeof testPath === 'string' &&
			((testPath === nativePath || testPath.endsWith(nativePathEnd))
				|| !usingPosixSep && (testPath === targetPath || testPath.endsWith(targetPathEnd)))
			? pattern : null;
	} : function (testPath, basename) {
		return typeof testPath === 'string' &&
			(testPath === nativePath
				|| (!usingPosixSep && testPath === targetPath))
			? pattern : null;
	};
	parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + targetPath];
	return parsedPattern;
}