Class UriPaths


  • public final class UriPaths
    extends Object
    Utility methods for URI GCS paths
    • Method Detail

      • toDirectory

        public static URI toDirectory​(URI path)
        Converts the given path to look like a directory path. If the path already looks like a directory path then this call is a no-op.
        Parameters:
        path - Path to convert.
        Returns:
        Directory path for the given path.
      • getParentPath

        public static URI getParentPath​(URI path)
        Gets the parent directory of the given path.
        Parameters:
        path - Path to convert.
        Returns:
        Path of parent directory of the given item or null for root path.
      • fromResourceId

        public static URI fromResourceId​(StorageResourceId resourceId,
                                         boolean allowEmptyObjectName)
        Constructs and returns full path for the given bucket and object names.
      • fromStringPathComponents

        public static URI fromStringPathComponents​(String bucketName,
                                                   String objectName,
                                                   boolean allowEmptyObjectName)
        Constructs and returns full path for the given bucket and object names.