filekit-core works without setup on most targets. JVM desktop, Linux native, and Windows native need an application ID so FileKit can resolve FileKit.filesDir, FileKit.cacheDir, and FileKit.databasesDir. Add the dependency first: see Installation.
Initialize FileKit
- Android
- JVM desktop
- Linux native
- Windows native
- iOS, macOS, watchOS, web
Nothing to do. FileKit Core initializes itself with App Startup.Dialogs need their own registration when you use
These directories can’t be changed. If you disable App Startup in your app, initialize FileKit Core yourself before using it:
MainActivity.kt
filekit-dialogs without Compose. See Dialogs setup.On JVM, Linux native, and Windows native, reading
FileKit.filesDir, cacheDir, or databasesDir before FileKit.init throws. FileKit creates filesDir and cacheDir the first time you read them.ProGuard
If you shrink or obfuscate a JVM desktop app, add these rules to yourproguard-rules.pro:
proguard-rules.pro
Related
- App directories: app directories and user folders such as Downloads.
- Dialogs setup: Android activity registration and Linux packaging.