From 203aa52efe499f8bbd351c27192183ffc8536afa Mon Sep 17 00:00:00 2001 From: Kirill Grachev Date: Fri, 5 May 2023 00:17:56 +0300 Subject: [PATCH] SNRK-68: Implement missed --- .../kotlin/space/kscience/snark/storage/s3/S3Root.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/snark-storage-driver/src/main/kotlin/space/kscience/snark/storage/s3/S3Root.kt b/snark-storage-driver/src/main/kotlin/space/kscience/snark/storage/s3/S3Root.kt index 3f0037c..8f32607 100644 --- a/snark-storage-driver/src/main/kotlin/space/kscience/snark/storage/s3/S3Root.kt +++ b/snark-storage-driver/src/main/kotlin/space/kscience/snark/storage/s3/S3Root.kt @@ -25,6 +25,10 @@ internal class S3Root(private val client: S3Client) : Directory { throw NoSuchFileException(Path(filename).toFile()) } + override suspend fun get(filename: Path): FileReader { + throw NoSuchFileException(filename.toFile()) + } + override suspend fun create(filename: String, ignoreIfExists: Boolean) { throw NoSuchFileException(Path(filename).toFile()) } @@ -33,6 +37,10 @@ internal class S3Root(private val client: S3Client) : Directory { throw NoSuchFileException(Path(filename).toFile()) } + override suspend fun put(filename: Path): FileWriter { + throw NoSuchFileException(filename.toFile()) + } + override suspend fun getSubdir(path: Path): Directory = try { val (bucketName, filePath) = splitPathIntoBucketAndPath(path) client.headBucket { @@ -53,6 +61,9 @@ internal class S3Root(private val client: S3Client) : Directory { throw AccessDeniedException(Path(dirname).toFile(), reason = ex.message) } + override val path: Path + get() = Path("") + override fun close() { }