StoreLocator
Where a KryptoStore androidx.datastore.core.DataStore persists.
Prefer Platform from commonMain: file targets use Platform.producePath, JS/Wasm use Platform.name (IndexedDB for typed proto, localStorage for preferences).
File / Named are explicit single-backend escape hatches (fail closed on the wrong target).
Inheritors
Types
Functions
Link copied to clipboard
Applies this locator's logical store name (for StoreLocator.Platform and StoreLocator.Named) to options via EncryptedStoreOptions.applyDefaultStoreName so AAD derivation is identical across file and web targets when EncryptedStoreOptions.storeName is left at its default.
Link copied to clipboard
fun <R> StoreLocator.resolve(onFile: (producePath: () -> Path) -> R, onNamed: (name: String) -> R): R
Resolves this locator to a file path or web name for the current target.
fun <R> StoreLocator.resolve(usesFileStorage: Boolean, onFile: (producePath: () -> Path) -> R, onNamed: (name: String) -> R): R
Same as resolve with an explicit usesFileStorage override (tests / tooling).