Reputation: 8557
There was a File System API but shown as deprecated now:
https://developer.mozilla.org/en-US/docs/Web/API/Window/requestFileSystem
There is now another, File System Access API:
https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
What happened to the old API and why was it discontinued? Should the new File System Access API be stable in all common browsers?
Upvotes: 3
Views: 2785
Reputation: 17959
The documentation on the file-related APIs is a real mess in my opinion. I have yet to find a definitive place that disambiguates between all the terms.
The best summary I've seen so far is probably here. But even it leaves a lot of confusion and ambiguity (eg. since it doesn't include all of the various names for the linked APIs).
So this StackOverflow answer is the place where I'll try to disambiguate between them. I haven't 100% verified every point gathered below, but it's a "best effort" summarization. (and of course welcomes corrections)
Names seen used:
File System API
: MDN page(Native File System)
: GitHub summary commentComponents:
Description:
Origin Private File System
component, which doesn't require user permissions since sandboxed)Names seen used:
FileSystem API
: MDN page (nav-bar says "Web APIs -> FileSystem")File and Directory Entries API
: MDN page (table-of-contents header)File API: Directories and System
: W3C page (page title)Description:
window.requestFileSystem
function) seems to have been deprecated, but is still in use, eg. by Github, as per this comment.Names seen used:
File API
: MDN pageDescription:
Names seen used:
Storage Foundation API
: Chrome page, GitHub repoDescription:
These don't deal with "files" specifically, but for comprehensiveness, these are other APIs for storage that are usable from web APIs:
Cookies
: MDN pageLocal storage
: MDN pageSession storage
: MDN pageShared storage
: MDN pageIndexedDB
: MDN pageWebSQL
[deprecated]: W3C pageUpvotes: 2
Reputation: 8557
It turned out that File System Access API is not deprecated, it's just not standardised (May 2021); the deprecated one is the function window.requestFileSystem
; the same function on Chromium-based browsers is window.webkitRequestFileSystem
.
File System API
is for creating a virtual drive (temporary or persistent) for each website when using browser-based db (IndexedDB) is not necessary especially for the purpose of storing files.
https://developer.mozilla.org/en-US/docs/Web/API/FileSystem
File System Access API
is different, it is for accessing the real file system of the OS. This API is now standardised and available on Chromium-based browsers (May 2021). Firefox has not yet adapted this API.
https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
Status of these APIs: https://developer.mozilla.org/en-US/docs/Web/API
Upvotes: 7