code: @Deprecated
    public static URI getParentPath(PathCodec pathCodec, URI path) {
      Preconditions.checkNotNull(path);
  
      // Root path has no parent.
      if (path.equals(GCS_ROOT)) {
        return null;
      }
  
      StorageResourceId resourceId = pathCodec.validatePathAndGetId(path, true);
  
      if (resourceId.isBucket()) {
        return GCS_ROOT;
      }
  
      int index;
      String objectName = resourceId.getObjectName();
      if (FileInfo.objectHasDirectoryPath(objectName)) {
        index = objectName.lastIndexOf(PATH_DELIMITER, objectName.length() - 2);
      } else {
        index = objectName.lastIndexOf(PATH_DELIMITER);
      }
      return index < 0
          ? pathCodec.getPath(resourceId.getBucketName(), null, true)
          : pathCodec.getPath(resourceId.getBucketName(), objectName.substring(0, index + 1), false);
    }
docs: Gets the parent directory of the given path.
  
  @deprecated This static method is included as a transitional utility and the
  instance method variant should be preferred.
  @param path Path to convert.
  @return Path of parent directory of the given item or null for root path.