saveFile

abstract suspend fun saveFile(bytes: ByteArray, fileName: String): Outcome<Unit, KmpFsError>

Saves data into a new file. This will present a file picker on all non-JS platforms. On JS platforms this will show a file picker unless the user has downloads automatically saved to a specific folder.


open suspend fun saveFile(source: IKmpIoSource, fileName: String): Outcome<Unit, KmpFsError>

saveFile Save data from a source into a new file

Parameters

source

The KmpFsSource to read from

fileName

The suggested file name to the user. The user can override this.