Class BucketPath

    • Constructor Detail

      • BucketPath

        public BucketPath​(String uri)
                   throws IllegalArgumentException
        Prepares a new BucketPath.
        Parameters:
        uri - path to the bucket object, of the form "gs://bucket_name/path/to/object". May contain other characters (i.e., *), no verification is done in this class.
        Throws:
        IllegalArgumentException
      • BucketPath

        public BucketPath​(String bucket,
                          String object)
        Initializes BucketPath directly, with no parsing or substitutions.
        Parameters:
        bucket - The bucket portion of the URI.
        object - The path to the object portion of the URI not including bucket.
    • Method Detail

      • error

        public boolean error()
        Determines if this is an invalid BucketPath.
        Returns:
        False if the bucket is empty.
      • getPath

        public String getPath()
        Returns:
        Regenerate the path (without gs:// prefix)
      • getBucket

        public String getBucket()
        Returns:
        The Bucket portion of the URI
      • getObject

        public String getObject()
        Returns:
        The object portion of the URI