code: @Override
    public FileStatus[] globStatus(Path pathPattern, PathFilter filter) throws IOException {
      checkOpen();
  
      logger.atFine().log("GHFS.globStatus: %s", pathPattern);
      // URI does not handle glob expressions nicely, for the purpose of
      // fully-qualifying a path we can URI-encode them.
      // Using toString() to avoid Path(URI) constructor.
      Path encodedPath = new Path(pathPattern.toUri().toString());
      // We convert pathPattern to GCS path and then to Hadoop path to ensure that it ends up in
      // the correct format. See note in getHadoopPath for more information.
      Path encodedFixedPath = getHadoopPath(getGcsPath(encodedPath));
      // Decode URI-encoded path back into a glob path.
      Path fixedPath = new Path(URI.create(encodedFixedPath.toString()));
      logger.atFine().log("GHFS.globStatus fixedPath: %s => %s", pathPattern, fixedPath);
  
      if (enableConcurrentGlob && couldUseFlatGlob(fixedPath)) {
        return concurrentGlobInternal(fixedPath, filter);
      }
  
      if (enableFlatGlob && couldUseFlatGlob(fixedPath)) {
        return flatGlobInternal(fixedPath, filter);
      }
  
      return super.globStatus(fixedPath, filter);
    }
docs: Returns an array of FileStatus objects whose path names match pathPattern and is accepted by
  the user-supplied path filter. Results are sorted by their path names.
  
  <p>Return null if pathPattern has no glob and the path does not exist. Return an empty array if
  pathPattern has a glob and no path matches it.
  
  @param pathPattern A regular expression specifying the path pattern.
  @param filter A user-supplied path filter.
  @return An array of FileStatus objects.
  @throws IOException if an error occurs.