file_system_access 0.1.1
file_system_access: ^0.1.1 copied to clipboard
Real files on Flutter Web. Save in place instead of downloading a copy, and reopen the same file after a reload with the File System Access API.
0.1.1 #
PermissionDeniedExceptionis now actually thrown. It was exported from 0.1.0 but nothing raised it, so a caller could write acatchthat could never fire. A refused write surfaces as the browser'sNotAllowedError, which says nothing useful on its own; it is now translated, and the message says to callrequestPermission(write: true)from a user gesture.
0.1.0 #
Initial release: the File System Access API for Flutter Web.
openFiles,saveFileandopenDirectorywrap the three pickers, whichpackage:webmentions in its doc comments but does not bind.FileHandle.writeText/writeByteswrite back into the file the user picked, in place — not a second copy in their Downloads folder.remember/recallFile/recallDirectorykeep a handle in IndexedDB, so the same file is reachable after a full page reload.DirectoryHandlelists, opens and removes entries, with async iteration bound by hand sincepackage:webdoes not expose it.permissionandrequestPermissionreportgranted,promptordeniedrather than a boolean, because "must ask" is not the same as "refused".FileSystemAccess.supportanswers for each picker and the origin-private file system separately — Safari has the latter and none of the former.- Off the web the package still compiles and reports everything unsupported.
Tested in a real browser via flutter test --platform chrome, including a
handle stored in IndexedDB and the file read back through it after recall.