23

I am going through the W3C specification proposals, and from what one can read here: http://www.w3.org/TR/file-system-api/

"Work on this document has been discontinued and it should not be referenced or used as a basis for implementation."


Is the FileAPI no longer an HTML5 specification or does it mean that it's implementation details will just change?

nicholaswmin
  • 21,686
  • 15
  • 91
  • 167
  • 2
    Some good details present on this thread - [Writing file to desktop using HTML5 FileSystem API](https://stackoverflow.com/a/23348593/465053) – RBT Jun 06 '18 at 16:17

2 Answers2

24

Update May 2021: There's a new effort to enable some form of file system access in browsers, the File System Access API. As of this writing it's only supported by Chromium-based browsers (including the Chromium-based Microsoft Edge). Mozilla's position (for Firefox) is "wait and see." I haven't found a position from Apple (for Safari and iOS Safari)


The File API is distinct from the File API - Directories and System.

The File API itself is not only not dead, but reasonably well-supported. (IE8 being the only significant [and happily receding] desktop browser without support.)

The Directories and System document...

...defines an API to navigate file system hierarchies, and defines a means by which a user agent may expose sandboxed sections of a user's local filesystem to web applications. It builds on File API, which in turn built on File API: Writer, each adding a different kind of functionality.

Apparently there were issues with it and so that effort is being abandoned, probably in favor of doing something else.


...I can't seem to grasp how can browsers implement a feature and then suddenly realise they no longer want to support it

You may find this thread interesting. Basically, only Chrome ever had it. Mozilla, Apple, and Microsoft (and others) didn't want to implement it. E.g., it's not that Google decided they they didn't want it anymore, but that they never convinced the other vendors it was worth implementing. A web standard only implemented by one vendor isn't a web standard. The final nail was announced here.

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
  • 2
    So I can take files from the local disk, but I cannot write files anymore? – nicholaswmin May 11 '14 at 19:30
  • Well, you never could except in Chrome. :-) – T.J. Crowder May 12 '14 at 05:04
  • 1
    This is really a pity, I am working on a sound editor and read/write access to (uncompressed wave) files on disk is quite handy. To my knowledge IndexedDB does not support seeking and rewriting objects (blobs) put in the ObjectStore, correct? – Jan Misker May 16 '14 at 00:24
  • 1
    You could potentially chunk files into indexed blobs yourself. Definitely a crappy work-around, but it doesn't look like anything better is forthcoming. – rubyruy Jan 17 '15 at 01:07
  • For those interested in reading and writing files, see [this example](https://googlechromelabs.github.io/text-editor/) ([repo](https://github.com/GoogleChromeLabs/text-editor/)). Just press `CTRL`+`S`, and it gets saved. To a local text file. Like in a text editor. Please notice, the blue and orange browsers can not do this. Please uninstall and use a better one. I suggest this [privacy enhanced version](https://ungoogled-software.github.io/ungoogled-chromium-binaries/). – Nils Lindemann May 04 '21 at 13:51
  • 1
    @NilsLindemann - Thanks for flagging that up on this ancient answer. I've updated it. "...the blue and orange browsers..." It's unnecessary to make people feel stupid if they don't know what you mean by that. If by "blue" you mean "Microsoft," Edge has been Chromium-based for a while now and does have the experimental Chromium-only API that project uses enabled. If by "orange" you mean Firefox (as opposed to the other orange one, [Brave](https://brave.com)), [Mozilla's position](https://mozilla.github.io/standards-positions/#native-file-system) is wait and see... – T.J. Crowder May 04 '21 at 14:11
  • @T.J.Crowder thank you, that is awesome! Have my up vote. Yeah, my approach regarding the orange browser is also "wait and see"... – Nils Lindemann May 04 '21 at 14:18
5

I think the FileSystem API is dead already. When I search it in the MDN web docs, I saw these:

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Also I search it in https://caniuse.com/ too, and the result is:

enter image description here

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
omgdog
  • 61
  • 1
  • 4