Known direct subclasses
FileStorage

The Java IO File version of the Storage interface.

OkioStorage

OKIO implementation of the Storage interface, providing cross platform IO using the OKIO library.


Storage provides a way to create StorageConnections that allow read and write a particular type of data. Storage is used to construct DataStore objects, and encapsulates all the specifics of the data format and persistence.

Implementers provide the specifics of how and where the data is stored.

Summary

Public functions

StorageConnection<T>

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

Cmn

Public functions

createConnection

fun createConnection(): StorageConnection<T>

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

Should be closed after usage.

Throws
androidx.datastore.core.IOException

Unrecoverable IO exception when trying to access the underlying storage.