> ## Documentation Index
> Fetch the complete documentation index at: https://filekit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# FileKit

> Pick, save, read, and write files with one Kotlin Multiplatform API, using each platform's native dialogs.

![FileKit: file operations, pickers, and dialogs for Kotlin and Compose Multiplatform](https://mintcdn.com/filekit/O3A078ijpazSdC5J/brand/hero.webp?fit=max\&auto=format\&n=O3A078ijpazSdC5J\&q=85\&s=d598e56274ef4f253d09b5decb23f0c7)

**FileKit is the file layer for Kotlin Multiplatform.** Open native file, photo, directory, and camera pickers, save and share files, and read or write them through a single `PlatformFile` type. The same code runs on Android, iOS, macOS, desktop JVM (Windows, macOS, Linux), Linux and Windows native, JS, and Wasm, and FileKit Core also runs on watchOS.

![FileKit is supported by the Kotlin Foundation Grants Program](https://filekit.mintlify.site/brand/grant-banner-light.webp)

The grant supports the work toward FileKit 1.0.

Read the announcement →

[Open](https://kotlinfoundation.org/news/grants-program-winners-26/)

## FileKit in 30 seconds

Let the user pick a photo, then show it or read its bytes.

```kotlin Compose theme={null}
@Composable
fun PhotoPicker() {
    val scope = rememberCoroutineScope()
    var photo by remember { mutableStateOf<ImageBitmap?>(null) }

    val launcher = rememberFilePickerLauncher(
        type = FileKitType.Image,
        onError = { failure -> println("Picker failed: ${failure.message}") },
    ) { file ->
        // null when the user cancels
        if (file != null) scope.launch { photo = file.toImageBitmap() }
    }

    Button(onClick = { launcher.launch() }) { Text("Pick a photo") }
    photo?.let { Image(bitmap = it, contentDescription = null) }
}
```

```kotlin Suspend API theme={null}
suspend fun importPhoto() {
    // Native picker on every platform; null when the user cancels
    val photo = FileKit.openFilePicker(type = FileKitType.Image) ?: return

    println("${photo.name}: ${photo.size()} bytes")

    // Read it, then upload it or store it
    val bytes: ByteArray = photo.readBytes()
}
```

> [card] [Try it in your browser](https://filekit.mintlify.site/live-demo.md)
>
> Run the FileKit sample app live, with no install.

> [card] [Run it in two minutes](https://filekit.mintlify.site/quickstart.md)
>
> Add one dependency, do the per-platform setup, and pick your first file.

## What you can build

> [card] [Photo and file uploads](https://filekit.mintlify.site/dialogs/file-picker.md)
>
> Open the native file picker or the Android and iOS photo picker, then read the bytes to upload them.

> [card] [Export and save documents](https://filekit.mintlify.site/dialogs/file-saver.md)
>
> Ask the user where to save a file, then write text, bytes, or a stream to it.

> [card] [Work with project folders](https://filekit.mintlify.site/dialogs/directory-picker.md)
>
> Let users pick a folder, then list, walk, and copy its contents. Keep access across launches with bookmarks.

> [card] [Camera capture and photo processing](https://filekit.mintlify.site/dialogs/camera-picker.md)
>
> Take a photo, compress or resize it, and save it to the user's gallery.

> [card] [Share and open files](https://filekit.mintlify.site/dialogs/share-file.md)
>
> Send a file to the system share sheet or open it in the default app.

> [card] [Local app storage](https://filekit.mintlify.site/core/file-utils.md)
>
> Store files in the app's files, cache, and databases directories. The same paths work with DataStore or Room.

## Platforms

| Android | iOS | macOS | JVM desktop | Linux native | Windows native | JS | Wasm | watchOS |
| :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | Core only |

Every target with `filekit-dialogs` uses the platform's native dialogs (watchOS has FileKit Core only). Some features are platform-specific: the camera and share sheet are mobile-only, the file saver is not available in browsers, and Compose and Coil support follows Compose Multiplatform's targets. See the [platform support matrix](https://filekit.mintlify.site/platform-support.md) for a feature-by-feature breakdown.

## Modules

Add only the modules you need. Each module pulls in the ones it builds on.

| Artifact | What it gives you | Add it when |
| - | - | - |
| `filekit-core` | `PlatformFile`, reading and writing, file system operations, app directories, image utilities, bookmarks | You work with files and don't need dialogs |
| `filekit-dialogs` | Native file, gallery, directory, and camera pickers, plus the file saver, share, and open-file dialogs, as `suspend` functions | You open dialogs from shared code, ViewModels, or non-Compose UI |
| `filekit-dialogs-compose` | `remember…Launcher` APIs and `PlatformFile.toImageBitmap()` | Your UI uses Compose Multiplatform |
| `filekit-coil` | `PlatformFile` support in Coil 3 `AsyncImage` | You display images with Coil |

```mermaid theme={null}
graph LR
    A[filekit-core] --> B[filekit-dialogs]
    B --> C[filekit-dialogs-compose]
    A --> D[filekit-coil]
```

## Next steps

> [card] [Quickstart](https://filekit.mintlify.site/quickstart.md)
>
> Pick and read your first file.

> [card] [Installation](https://filekit.mintlify.site/installation.md)
>
> Dependencies and per-platform setup.

> [card] [Platform support](https://filekit.mintlify.site/platform-support.md)
>
> See which features each platform supports.

> [card] [Use FileKit with AI assistants](https://filekit.mintlify.site/ai-assistants.md)
>
> Give your coding assistant the FileKit docs through MCP, `llms.txt`, or Markdown.

## Who uses FileKit

> The API just makes sense and I can just focus on my app instead of fighting with platform APIs

![](https://github.com/alexstyl.png?size=96)

Alex Styl
Composables

[@alexstyl on X, Jun 2, 2025](https://x.com/alexstyl/status/1929504630490239214)

> You literally saved me hours and hours of time 👍

![](https://github.com/SimonSchubert.png?size=96)

Simon Schubert
Kai

[@SimonSchubert on GitHub, Mar 15, 2026](https://github.com/vinceglb/FileKit/discussions/343#discussioncomment-16142366)

> \[...] your documentation is outstanding. Finally a human friendly documentation 😅

![](https://github.com/PavlosTze.png?size=96)

Pavlos Tzegiannakis
Tracker for Bluesky

[@PavlosTze on GitHub, Mar 18, 2025](https://github.com/vinceglb/FileKit/issues/215#issuecomment-2734341542)

See how each project uses FileKit in the [showcase](https://filekit.mintlify.site/showcase.md), and read more on the [wall of love](https://filekit.mintlify.site/wall-of-love.md).

Browse the [sample apps](https://github.com/vinceglb/FileKit/tree/main/sample) to see FileKit running on each platform.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.