createDataStore

fun createDataStore(producePath: () -> String): DataStore<Preferences>

Creates a DataStore instance with a custom path.

This function creates a preferences DataStore at the path provided by the lambda. It's used by platform-specific implementations to create the DataStore with the appropriate file path for each platform.

Return

A configured DataStore instance

Parameters

producePath

A lambda that returns the absolute path where the DataStore file should be created