FileManager

interface FileManager<T : @Serializable Any>

interface for the file managers to load and save a serializable item to/from disk

Parameters

FILENAME

to store the data at

Inheritors

Properties

Link copied to clipboard
abstract val FILENAME: String

Functions

Link copied to clipboard
abstract fun deleteData(context: Context): () -> Unit

delete the data by deleting the file

Link copied to clipboard
abstract fun loadData(context: Context): List<T>

load the data from the FILENAME

Link copied to clipboard
abstract fun saveData(context: Context, ingredients: List<T>)

save the data from the FILENAME