#868: The `FileSystemObserver` interface

Visit on Github.

Opened Jun 23, 2023

こんにちは TAG-さん!

I'm requesting a TAG review of the FileSystemObserver interface for the File System specification.

This proposal introduces a FileSystemObserver interface which will much more easily allow a website to be notified of changes to the file system.

The file system is a shared resource that can be modified from several contexts. A Bucket File System (a.k.a. an Origin Private File System, or OPFS) spans numerous agents - tabs, workers, etc - within the same storage key. The local file system also spans across origins and other applications on the host operating system.

Currently, for a given agent to know about modifications to the file system - made either by itself or from some external context - it must poll the file system to detect changes. This is inefficient and does not scale well.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the incubation/design work on this is being done: whatwg/fs and WICG/file-system-access
  • The group where standardization of this work is intended to be done: whatwg/fs
  • Existing major pieces of multi-stakeholder review or discussion of this design: Developers have enumerated several use cases, discussed various designs, and provided example code for how file paths can be watched with the existing APIs in https://github.com/WICG/file-system-access/issues/72. No discussion with other stakeholders yet
  • Major unresolved issues with or opposition to this design:
  • This work is being funded by: Google

You should also know that...

The proposed interface can be used to observe both files on the user's local device (as specified in WICG/file-system-access) and files in the Bucket File System (as specified in whatwg/fs).

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

Discussions

Discussed Dec 18, 2023 (See Github)

Holding comment, Multistakeholder? Current status?

Amy: the use cases in the explainer are not from the user's perspective.

Yves: clearly for developers...

Comment by @torgo Dec 18, 2023 (See Github)

Hi @a-sully this unfortunately seems to have dropped off our radar and we did not get to it in a timely fashion. My apologies. Can you update us on the latest status of this proposal? Also it would be good to understand the multi-stakeholder situation - especially any support from other browsers. That will help us get you an answer quickly.

Comment by @a-sully Dec 18, 2023 (See Github)

Hi @a-sully this unfortunately seems to have dropped off our radar and we did not get to it in a timely fashion. My apologies. Can you update us on the latest status of this proposal?

Sure thing! This feature is currently being prototyped in Chromium. It's a very highly requested feature from developers that we're hoping to get into their hands sometime early next year

Also it would be good to understand the multi-stakeholder situation - especially any support from other browsers. That will help us get you an answer quickly.

My apologies for forgetting to file the standards position issues months ago. I have discussed this idea in the abstract with some folks from other browsers in the past, though I believe that was before a concrete proposal was made. I've now filed https://github.com/mozilla/standards-positions/issues/942 and https://github.com/WebKit/standards-positions/issues/291 to solicit their input :)

Discussed Jan 1, 2024 (See Github)

lea shares comment

Discussed Jan 1, 2024 (See Github)

Sangwhan: I am OK with this

Yves: use case is OK....

Yves: it says on the local file system... def of local file system may be Origin-controlled. Looks OK but depeneds on whether other stakeholders...

Dan: does it have a dependency on local filesystem?

Yves: no.

Sangwhan: no.

Sangwhan: I'm looking at the API to see if it makes sense... API looks good to me.

Dan: please add some wording to encourage continued engagement with additional implementers...

Sangwhan: closes

Comment by @cynthia Jan 25, 2024 (See Github)

We reviewed this during our F2F, and the feature looks great! Thanks for bringing this to our attention.

If there are any negative signals from other implementors that may require a significant change, please let us know and we can reopen for further discussion.

Comment by @dslee414 Dec 9, 2024 (See Github)

Hi, I would like to note that the spec PR is in progress: https://github.com/whatwg/fs/pull/165

It does not differ much from the original design proposed here, with some minor changes such as FileSystemChangeType names.