Intent to Prototype: FileSystemObserver

206 views
Skip to first unread message

Austin Sullivan

unread,
Jun 23, 2023, 4:25:46 PM6/23/23
to blink-dev, chrome-ow...@google.com, Ajay Rahatekar

Contact emails

asu...@chromium.org


Explainer

https://github.com/whatwg/fs/blob/main/proposals/FileSystemObserver.md 


Summary

The FileSystemObserver interface for the File System specification 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.


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).


Blink component

Blink>Storage>FileSystem


TAG review

https://github.com/w3ctag/design-reviews/issues/868 


TAG review status

Pending


Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: Strongly positive (WICG/file-system-access#72, whatwg/fs#123, w3c/IndexedDB#51)


Ergonomics


This will significantly improve the ergonomics of watching file paths, which currently requires polling the file system for changes. See example code in the Key Scenarios section of the explainer.


Security


This API does not expose any information to the web that isn’t already exposed, nor does it expand the permissions of a website as a result of a file system change. See the Permissions Considerations, Fingerprinting Risk, and Privacy Considerations sections of the explainer for more details.



Debuggability

N/A


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes


Is this feature fully tested by web-platform-tests?

Not yet


Flag name

FileSystemObserver


Requires code in //chrome?

False


Tracking bug

https://crbug.com/1019297 


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4622243656630272 


This intent message was generated by Chrome Platform Status.


Reply all
Reply to author
Forward
0 new messages