Skip to content
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

Add more keys to OPFS #2053

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Elchi3
Copy link
Collaborator

@Elchi3 Elchi3 commented Oct 23, 2024

This was originally added here: #1033 and it had a bunch of later additions in comments (which then got lost as we migrated to BCD tags).

Compare with the latest draft file: https://github.com/web-platform-dx/web-features/blob/main/features/draft/spec/fs.yml

I'm not sure if the correct way forward here is to use compute_from or to split some of this out to a new feature. Help appreciated.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Oct 23, 2024
@captainbrosset
Copy link
Contributor

I think these keys need to go into the file-system-access feature instead.

The File System Access API is more general than OPFS. In a way, OPFS is one implementation of the File System Access API, or rather, one way to use it.

The entry point for OPFS is navigator.storage.getDirectory() which gives you access to a directory where you can then read/write/manipulate directories and files, just like you would with the File System Access API. But this directory is per origin only, and the browser can choose to implement it any way it likes (including without using real files on disk).

File System Access API, in contrast, gives you access to the real files and folders on disk, and therefore multiple origins can access the same files if the user allows it.

I think we need to keep all of the filesystem handle interface stuff in the more general File System Access API feature, and leave OPFS mostly focused on the getDirectory method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants