private static function splitPathOnWildcard($path) {
    // On windows DIRECTORY_SEPARATOR is a '\' which we need to escape.
    $sep = addslashes(DIRECTORY_SEPARATOR);
    $pattern = sprintf(static::WILDCARD_PATTERN, $sep, $sep);
    if (preg_match($pattern, $path, $matches)) {
      return array_slice($matches, 1);
    }
    return false;
  }