Skip to content

Add 'write' value to FileSystemHandle permission descriptor.mode #40535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 26, 2025

Conversation

tomayac
Copy link
Contributor

@tomayac tomayac commented Jul 25, 2025

Description

The File System Access API defines two access modes for file system entries: "read" and "readwrite". These modes are used when querying or requesting permission to an entry.

An issue with the current model is that operations requiring only file system modification, such as FileSystemHandle.remove(), are forced to request broad "readwrite" permission. This behavior poses some unnecessary security risks. Add a new "write"-only access mode and adjust the existing APIs would solve the issue.

Motivation

Add 'write' value to FileSystemHandle permission descriptor.mode so developers are aware.

Additional details

Related issues and pull requests

See https://chromestatus.com/feature/5324970347200512 and https://wicg.github.io/file-system-access/#enumdef-filesystempermissionmode.

@tomayac tomayac requested a review from a team as a code owner July 25, 2025 23:27
@tomayac tomayac requested review from sideshowbarker and removed request for a team July 25, 2025 23:27
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jul 25, 2025
Copy link
Contributor

github-actions bot commented Jul 25, 2025

Preview URLs

(comment last updated: 2025-07-25 23:30:44)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants