public static bool MatchesSegment(this DirectorySegment segment, string pathSegment, bool caseSensitive) => MatchesSubSegment(segment.SubSegments, 0, -1, pathSegment, 0, caseSensitive);
public static bool MatchesSegment(this DirectorySegment segment, string pathSegment) => MatchesSubSegment(segment.SubSegments, 0, pathSegment, 0);