Migrate to v0.10
Guide to migrate from FileKit v0.8 to v0.10
FileKit v0.10 is a full rewrite of the library. It introduces a new API that is more consistent and easier to use. Also, it introduces new concepts that make it easier to work with files and directories on different platforms.
Migration Steps
Package names changed
The package names have been renamed to match the new API.
The filekit-core
package still exists but it only contains the core functionality of the library like PlatformFile without any dialogs capabilities.
Check the Installation page to learn more about the different modules.
Renamed methods
Some methods have been renamed to match the new API. Also, some arguments may have been changed but the behavior is the same.
Read more about the new API in the FileKit Dialogs documentation.
Changes in the saving file feature
FileKit.openFileSaver()
does not accept taking bytes
as parameter. Now, it only returns the path where the user has chosen to save the file.
We can now use the returned PlatformFile
to save the bytes to the file.
On web targets, opening the file saver is not possible anymore due to browser limitations. Instead, FileKit provides a download()
function that can be used to download a file from the web.
Take a look at the Writing files documentation to learn more about the new API.
Feedback
FileKit v0.10 is a major rewrite of the library. If you have any feedback, suggestions or questions, please let me know by opening a discussion on GitHub.
Also, if you find any issues, please open an issue on GitHub.