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

Request for Position: FileSystemHandle Remove Self #104

Closed
a-sully opened this issue Dec 7, 2022 · 5 comments
Closed

Request for Position: FileSystemHandle Remove Self #104

a-sully opened this issue Dec 7, 2022 · 5 comments
Labels
from: Google Proposed, edited, or co-edited by Google. position: support topic: storage Spec relates to storage mechanisms such as cookies, IndexedDB, or LocalStorage venue: WHATWG Storage Workstream Proposal is being reviewed in the WHATWG Storage Workstream

Comments

@a-sully
Copy link

a-sully commented Dec 7, 2022

Request for position on an emerging web specification

Information about the spec

Design reviews and vendor positions

Anything else we need to know

The explainer focuses mainly on the use cases outside of the Origin Private File System, but within the OPFS this method is (just) a significant improvement in API ergonomics.

@annevk
Copy link
Contributor

annevk commented Dec 7, 2022

What happens for (await navigator.storage.getDirectory()).remove({ recursive:true })?

It seems like in theory that ought to work as you have write access, but map["root"] will continue to exist, making subsequent invocations result in spec-UB I think. That looks like it needs some work.

This looks reasonable to me though.

@annevk annevk added topic: storage Spec relates to storage mechanisms such as cookies, IndexedDB, or LocalStorage from: Google Proposed, edited, or co-edited by Google. labels Dec 7, 2022
@a-sully
Copy link
Author

a-sully commented Dec 7, 2022

Good point - the WPTs assert that you can't remove a root, but it's not currently in the spec language. I can fix that

@a-sully
Copy link
Author

a-sully commented Dec 7, 2022

Oh just kidding, this is already covered. Conversation is happening here https://github.com/whatwg/fs/pull/9/files#r1042179453

@annevk
Copy link
Contributor

annevk commented Dec 8, 2022

Based on the linked PR I suggest we label this as "position: support" seven days from now.

@othermaciej othermaciej added the venue: WHATWG Storage Workstream Proposal is being reviewed in the WHATWG Storage Workstream label Dec 20, 2022
@hober
Copy link
Member

hober commented Mar 23, 2023

Closing as we've identified our position.

@hober hober closed this as completed Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google. position: support topic: storage Spec relates to storage mechanisms such as cookies, IndexedDB, or LocalStorage venue: WHATWG Storage Workstream Proposal is being reviewed in the WHATWG Storage Workstream
Development

No branches or pull requests

4 participants