title | sidebarTitle | description | og:title |
---|---|---|---|
FileKit Introduction |
Introduction |
Cross-Platform File Operations Made Simple for Kotlin Multiplatform |
FileKit |
FileKit is a lightweight yet powerful library that simplifies file operations across multiple platforms using Kotlin Multiplatform.
Whether you need to pick files, save documents, access photos, or manage directories, FileKit provides a consistent API that works seamlessly on Android, iOS, macOS, JVM (Windows, macOS, Linux), JS, and WASM.
// Pick an image file
val imageFile = FileKit.openFilePicker(type = FileKitType.Image)
// Pick multiple files
val files = FileKit.openFilePicker(mode = FileKitMode.Multiple())
// Pick a directory
val directory = FileKit.openDirectoryPicker()
// Save a file
PlatformFile(directory, "image.png").write(imageFile)
FileKit offers a comprehensive suite of tools for handling files across platforms:
- File & Media Pickers: Open files, images, videos, or any document type with platform-native pickers
- Directory Selection: Access directories easily with native folder pickers
- File Saving: Save files to user-selected locations
- Cross-Platform API: Write once, run everywhere with consistent behavior
- Compose Multiplatform Support: Seamless integration with Compose UI
- Coroutines Support: Asynchronous file operations with Kotlin coroutines
- Platform File Abstraction: Work with files consistently across platforms
- Coil Integration: Display images from files easily in your Compose UI
Get up and running with FileKit in minutes with our comprehensive guides:
Get started with FileKit in minutes Add FileKit to your Kotlin Multiplatform Learn about PlatformFile and essential FileKit concepts Pick files, save files, and more with FileKit DialogsFileKit is designed to be modular, allowing you to include only what you need:
graph TD
A[FileKit Core] --> B[FileKit Dialogs]
B --> C[FileKit Dialogs Compose]
A --> E[FileKit Coil]
- FileKit Core: Basic file operations and the
PlatformFile
abstraction - FileKit Dialogs: File pickers and save dialogs without UI dependencies
- FileKit Dialogs Compose: Compose Multiplatform integration for file operations
- FileKit Coil: Integration with Coil for image loading
Check out our sample projects to see FileKit in action across different platforms.