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

query access for filehandles #25

Closed
jesup opened this issue May 21, 2022 · 1 comment
Closed

query access for filehandles #25

jesup opened this issue May 21, 2022 · 1 comment

Comments

@jesup
Copy link
Contributor

jesup commented May 21, 2022

The language for getting FileHandles indicates you check the 'query access' for the file using readwrite if create is true, and read if create is false. (though it also says you don't need to implement this if you don't implement any dependent specs).

a) Does this mean you can't write to a file unless you pass create: true?
b) "not implementing any dependent specs" seems incredibly vague. They should be called out directly, or even better yet it should indicate under what circumstances it's needed to check the 'query access' in more concrete form, and then this rule can be applied to any current or future dependent specs.

@a-sully
Copy link
Collaborator

a-sully commented Jan 6, 2023

a) Does this mean you can't write to a file unless you pass create: true?

No. The behavior here is (to my pleasant surprise) properly specified, though within the OPFS there's no way to actually get a handle that will return anything other than "granted"

The query access algorithm for the root of the OPFS, given here, always returns "granted". Then, creating a child file or directory passes the query algorithm of the parent.

b) "not implementing any dependent specs" seems incredibly vague. They should be called out directly, or even better yet it should indicate under what circumstances it's needed to check the 'query access' in more concrete form, and then this rule can be applied to any current or future dependent specs.

I'm not seeing the "not implementing any dependent specs" language - perhaps it has since been taken out?

Closing this issue for now, but please re-open if there's more here worth discussing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants