vinceglb / FileKit

Pick and save Files, Medias and Folder for Kotlin Multiplatform / KMP and Compose Multiplatform / CMP
https://vinceglb.github.io/FileKit/
MIT License
249 stars 8 forks source link

Please provide file-stream #54

Open kagg886 opened 5 days ago

kagg886 commented 5 days ago

in my views, if we call readBytes() from a large file, this can cause oom

please support it, thks :D

vinceglb commented 2 days ago

Thanks for creating this issue! It's definitively a good idea, we'll probably add this feature. But I didn't have time to work on this feature shortly.

If you still need it quickly, it's possible to implement your custom code easily. PlatformFile lets you access the underling file on each platform. This means you can create an expect function and implement the file stream on each platform you are using.