v132 · file apis
File System Access
This API enables developers to build powerful apps that interact with other (non-Web) apps on the user’s device via the device’s file system. After a user grants a web app access, this API allows the app to read or save changes directly to files and folders selected by the user. Beyond reading and writing files, this API provides the ability to open a direct
concepts
-
File System Access
File System Access — picker-based read/write to user-chosen files and directories. Long-standing capability now flagged 'enabled by default' wherever it ships.
-
streaming write
Save 1–250 MB to disk through
createWritable()as aWritableStream; live progress, throughput, cancel. -
handle permission lifecycle
Walk a handle through every permission state.
queryPermission,requestPermissionfor both read and readwrite, with a live event log. -
directory walker
Pick a directory, recursively walk it with
for await, build a tree view, total file count and bytes. All client-side.
why it shipped
Today, if a website wants to create experiences involving local files (document editor, image compressor, IDE, etc.) they are at a disadvantage to native apps. A web site must ask the user to reopen a file every time they want to edit it. After opening, the site can only save changes by re-downloading the file to the Downloads folder. A native app, by comparison, can maintain a most recently used list, re-save and even auto save, and save files anywhere the user wants.