Package com.exasol.bucketfs
Interface ReadOnlyBucket
-
- All Known Subinterfaces:
Bucket,UnsynchronizedBucket
- All Known Implementing Classes:
ReadEnabledBucket,SyncAwareBucket,WriteEnabledBucket
public interface ReadOnlyBucketInterface for read-only bucket access.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddownloadFile(String pathInBucket, Path localPath)Download a file from a bucket to a local filesystem.StringdownloadFileAsString(String pathInBucket)Download a file from a bucket into a string.StringgetBucketFsName()StringgetBucketName()StringgetFullyQualifiedBucketName()Get the fully qualified name of the bucket.StringgetReadPassword()Get the read password for the bucket.List<String>listContents()List the contents of a bucket.List<String>listContents(String path)List the contents of a path inside a bucket.List<String>listContentsRecursively()Recursively list the contents of a bucket.List<String>listContentsRecursively(String path)Recursively list the contents of a path inside a bucket.
-
-
-
Method Detail
-
getBucketFsName
String getBucketFsName()
- Returns:
- name of the BucketFS filesystem this bucket belongs to
-
getBucketName
String getBucketName()
- Returns:
- name of the bucket
-
getFullyQualifiedBucketName
String getFullyQualifiedBucketName()
Get the fully qualified name of the bucket.- Returns:
- fully qualified name consisting of service name and bucket name
-
getReadPassword
String getReadPassword()
Get the read password for the bucket.- Returns:
- read password
-
listContents
List<String> listContents() throws BucketAccessException
List the contents of a bucket.- Returns:
- bucket contents
- Throws:
BucketAccessException- if the contents are not accessible or the path is invalid
-
listContentsRecursively
List<String> listContentsRecursively() throws BucketAccessException
Recursively list the contents of a bucket.- Returns:
- bucket contents
- Throws:
BucketAccessException- if the contents are not accessible or the path is invalid
-
listContents
List<String> listContents(String path) throws BucketAccessException
List the contents of a path inside a bucket.- Parameters:
path- relative path from the bucket root- Returns:
- list of file system entries
- Throws:
BucketAccessException- if the contents are not accessible or the path is invalid
-
listContentsRecursively
List<String> listContentsRecursively(String path) throws BucketAccessException
Recursively list the contents of a path inside a bucket.- Parameters:
path- relative path from the bucket root- Returns:
- list of file system entries
- Throws:
BucketAccessException- if the contents are not accessible or the path is invalid
-
downloadFile
void downloadFile(String pathInBucket, Path localPath) throws BucketAccessException
Download a file from a bucket to a local filesystem.- Parameters:
pathInBucket- path of the file in BucketFSlocalPath- local path the file is downloaded to- Throws:
BucketAccessException- if the local file does not exist or is not accessible or if the download failed
-
downloadFileAsString
String downloadFileAsString(String pathInBucket) throws BucketAccessException
Download a file from a bucket into a string.- Parameters:
pathInBucket- path of the file in BucketFS- Returns:
- file contents as string
- Throws:
BucketAccessException- if the local file does not exist or is not accessible or if the download failed
-
-