SNRK-68: Implement s3 storage
This commit is contained in:
parent
5b33419b37
commit
634eb2d69d
@ -15,6 +15,9 @@ internal class S3Directory(
|
||||
override suspend fun get(filename: String): FileReader =
|
||||
S3FileReader(client, bucketName, currentDir / filename)
|
||||
|
||||
override suspend fun get(filename: Path): FileReader =
|
||||
S3FileReader(client, bucketName, currentDir / filename)
|
||||
|
||||
override suspend fun create(filename: String, ignoreIfExists: Boolean) {
|
||||
if (!ignoreIfExists) {
|
||||
TODO("could not check if file exists")
|
||||
@ -24,6 +27,9 @@ internal class S3Directory(
|
||||
override suspend fun put(filename: String): FileWriter =
|
||||
S3FileWriter(client, bucketName, currentDir / filename)
|
||||
|
||||
override suspend fun put(filename: Path): FileWriter =
|
||||
S3FileWriter(client, bucketName, currentDir / filename)
|
||||
|
||||
override suspend fun getSubdir(path: Path): S3Directory =
|
||||
S3Directory(client, bucketName, currentDir / path)
|
||||
|
||||
@ -34,6 +40,9 @@ internal class S3Directory(
|
||||
S3Directory(client, bucketName, currentDir / dirname)
|
||||
}
|
||||
|
||||
override val path: Path
|
||||
get() = currentDir
|
||||
|
||||
override fun close() {
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user