Web page's file system

Anyone familiar with AIR SDK? AIR SDK supports manipulating files at app: and app-storage: schemes. app: resolves to a file or directory in the application's installation directory and app-storage: resolves to a file or directory in application's storage directory (that is, app data). Is there some API in stdweb crate for this, without having to use cache/cookies/LocalStorage/IndexedDB?

AIR is for flash, it doesn't work for the web. The web has no such concept as apps.

AIR is cross-platform (but WebAssembly support will come later). But consider a web game has to downloads MBs or GBs of data for pre-installation. What do they do to store installation files and avoid redownloading them?

I still want to be able to have storage directory in addition to installation directory.

IndexedDB is the closest thing the standard web APIs have to file storage.

Chrome has a nonstandard file API that may eventually be adopted, but the "origin private" files look like they will have storage quota limitations[1]. So in order to guarentee persistence you'd have to prompt the user for a location to load/store from.


  1. though what the policy will be is apparently undecided at least in that draft ↩︎

1 Like

I think that document implies you could persist permission to access a directory[1] so you wouldn't have to prompt every time the page was loaded, but I wouldn't swear to that interpretation being correct. And even if it is, it might change if the API is stabilized.


  1. in local storage or IndexedDB ↩︎

If you use Tauri

you can register your own protocols:

1 Like