DataStoreFile

Added in 1.0.0

public final class DataStoreFile

Summary

Public methods

dataStoreFile

public static final @NonNull FiledataStoreFile(@NonNull Context receiver, @NonNull String fileName)

Generate the File object for DataStore based on the provided context and name. The file is generated by calling File(context.applicationContext.filesDir, "datastore/$fileName"). This is public to allow for testing and backwards compatibility (e.g. if moving from the dataStore delegate or context.createDataStore to DataStoreFactory).

Do NOT use the file outside of DataStore.

The context of the application used to get the files directory @fileName the file name