Class LocalDiskStorage

    • Constructor Detail

      • LocalDiskStorage

        public LocalDiskStorage​(File baseStorageFolder)
        Constructor
        Parameters:
        baseStorageFolder - The local folder under all bucket folders are expected to be located
    • Method Detail

      • getBucket

        public LocalDiskBucket getBucket​(String bucketName)
        Specified by:
        getBucket in interface Storage<LocalDiskBucket,​File>
        Parameters:
        bucketName - The bucket name
        Returns:
        The bucket object for performing file operations on the given bucket. Calling this method on a non existing bucket should not fail and should not have any side effects.
      • getProtocol

        public String getProtocol()
        Specified by:
        getProtocol in interface Storage<LocalDiskBucket,​File>
        Returns:
        The protocol name serving as a prefix when using fully qualified paths (e.g. "gs" or "s3")
      • getOrCreateBucket

        public LocalDiskBucket getOrCreateBucket​(String bucketName)
        Creates the bucket if not exists already, and returns the object for manipulating it
        Parameters:
        bucketName - The name of the bucket
        Returns:
        The bucket object, pointing to the existing / new bucket