Add interface
This commit is contained in:
parent
f8e7f6567f
commit
6e9eb88934
@ -0,0 +1,20 @@
|
||||
package space.kscience.snark.storage
|
||||
|
||||
import java.nio.file.Path
|
||||
|
||||
public interface Directory : AutoCloseable {
|
||||
public suspend fun get(filename: String): FileReader?
|
||||
|
||||
public suspend fun create(filename: String, ignoreIfExists: Boolean = false)
|
||||
public suspend fun put(filename: String): FileWriter?
|
||||
|
||||
public suspend fun getSubdir(path: Path): Directory?
|
||||
}
|
||||
|
||||
public interface FileReader : AutoCloseable {
|
||||
public suspend fun readAll(): ByteArray
|
||||
}
|
||||
|
||||
public interface FileWriter : AutoCloseable {
|
||||
public suspend fun write(bytes: ByteArray)
|
||||
}
|
Loading…
Reference in New Issue
Block a user