mdn
mdn copied to clipboard
Add new "mode" option to FileSystemAccessFileHandle's createSyncAccessHandle and createWritable
Proposal
As part of the New Locking Scheme to Enable Multiple Readers and Writers, a new "mode" option is added to both FileSystemAccessFileHandle's createSyncAccessHandle and createWritable functions.
Browser support
Chrome
- Bug: https://crbug.com/1382215
- Feature status: https://chromestatus.com/feature/5172892632875008
- Shipping M121
Tasks
- createSyncAccessHandle() method
- [ ] Add "options" (FileSystemCreateSyncAccessHandleOptions dictionary) to Parameters
- [ ] Describe the "mode" property, it's possible values ("readwrite", "readonly", "readwrite-unsafe"), and its default value ("readwrite").
- createWritable() method
- [ ] Add the "mode" property to "options".
- [ ] Describe it, its possible values ("siloed", "exclusive"), and its default value ("siloed").
Dependencies
- [x] Feature needs to be shipped in Chrome (https://chromestatus.com/feature/5172892632875008)
Additional information
No response
Are you willing to support this work?
Can support with reviews and feedback.
@chrisdavidmills are you handling this? If so let me know otherwise I'll add to our team tasks
@Rumyra I'm happy to do this; I'll add it to my worklist.
Proposal makes sense and looks pretty solid; ideally we should wait until it's actually in the spec before documenting. I'll keep an eye on https://github.com/whatwg/fs/pull/151 for progress on this.
The feature will be shipped in Chrome stable on Tue, Jan 23, 2024.
@nathanmemmott I've added docs to cover these features: https://github.com/mdn/content/pull/35334. Would you be able to provide me with a tech review of this work, or is there someone more appropriate to ask?
Also pinging @tomayac as I know he is heavily involved with APIs around this area.
Reviewed this PR. Thanks for working on it!
Left a few comments on the PR. Looks good!
Great stuff, thanks @tomayac and @nathanmemmott!