function createMatcher(rootDir, pattern) {
  const matcherRootDir = rootDir.split(sep).join('/');
  const resolvedPattern =
    !isAbsolute(pattern) && !pattern.startsWith('*')
      ? posix.join(matcherRootDir, pattern)
      : pattern;
  return picoMatch(resolvedPattern);
}
@param {string} rootDir
@param {string} pattern
@returns {Matcher}