FileStorage

class FileStorage<T>(serializer: Serializer<T>, produceFile: () -> File) : Storage<T> (source)

The Java IO File version of the Storage interface. Is able to read and write T to a given file location.

Parameters

serializer

The serializer that can write to and from a byte array.

produceFile

The file producer that returns the file that will be read and written.

Constructors

Link copied to clipboard
fun <T> FileStorage(serializer: Serializer<T>, produceFile: () -> File)

Functions

Link copied to clipboard
open override fun createConnection(): StorageConnection<T>

Creates a storage connection which allows reading and writing to the underlying storage.