code: public FileInfo getFileInfo(URI path) throws IOException {
      logger.atFine().log("getFileInfo(%s)", path);
      checkArgument(path != null, "path must not be null");
      // Validate the given path. true == allow empty object name.
      // One should be able to get info about top level directory (== bucket),
      // therefore we allow object name to be empty.
      StorageResourceId resourceId = pathCodec.validatePathAndGetId(path, true);
      FileInfo fileInfo =
          FileInfo.fromItemInfo(
              pathCodec,
              getFileInfoInternal(resourceId, gcs.getOptions().isInferImplicitDirectoriesEnabled()));
      logger.atFine().log("getFileInfo: %s", fileInfo);
      return fileInfo;
    }
docs: Gets information about the given path item.
  
  @param path The path we want information about.
  @return Information about the given path item.
  @throws IOException