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

FileSystemHandle.remove() for the File System Access API #773

Closed
1 task done
a-sully opened this issue Sep 9, 2022 · 5 comments
Closed
1 task done

FileSystemHandle.remove() for the File System Access API #773

a-sully opened this issue Sep 9, 2022 · 5 comments
Assignees
Labels
Missing: Multi-stakeholder support Lack of multi-stakeholder support Progress: review complete Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Resolution: timed out The TAG has requesed additional information but has not received it Review type: Already shipped Already shipped in at least one browser Review type: small delta Topic: Filesystem Venue: WHATWG Venue: WICG

Comments

@a-sully
Copy link

a-sully commented Sep 9, 2022

Wotcher TAG!

I'm requesting a TAG review of FileSystemHandle::remove() for the File System Access API.

Currently, it is not possible to remove a file or directory given its handle. You must obtain the handle of the parent directory, which there is no straightforward way to do and may not be possible in some cases, and call FileSystemDirectoryHandle::removeEntry().

Introducing a new method, FileSystemHandle::remove() (which follows the pattern of https://dom.spec.whatwg.org/#dom-childnode-remove), enables the common use case where you obtain a file handle from showSaveFilePicker(), but then decide you don't want to save after all, and delete the file.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the work on this specification is currently being done: whatwg/fs (initial work was started WICG, but the relevant parts to this proposal have been moved to whatwg)
  • The group where standardization of this work is intended to be done: whatwg/fs
  • Major unresolved issues with or opposition to this specification:
  • This work is being funded by: Google

We'd prefer the TAG provide feedback as:

🐛 open issues in our GitHub repo for each point of feedback

@rhiaro
Copy link
Contributor

rhiaro commented Dec 1, 2022

Thanks for your review request. On the surface, the developer need you have laid out seems reasonable. Could you articulate this in terms of the impact on the end user, in a small standalone explainer please? Also it would be helpful if you can respond to the security & privacy questionnaire in a way specific to this addition to the spec. We would like clarity on cases where the file handle is obtained from an open file (as opposed to from showSaveFilePicker()), as well as mitigations against the risks of recursive directory removal using this method.

@a-sully
Copy link
Author

a-sully commented Dec 7, 2022

Sure thing. The explainer is at a-sully/fs#1 (with a more readable preview of the markdown here)

@torgo
Copy link
Member

torgo commented Dec 20, 2022

@a-sully is there a Mozilla Standards Position on this? The comment you've linked to in the explainer under Gecko seems a little vague and possibly out of date? Also do you have any further info / documentation on developer interest?

@torgo torgo added the Missing: Multi-stakeholder support Lack of multi-stakeholder support label Dec 20, 2022
@a-sully
Copy link
Author

a-sully commented Dec 21, 2022

Yeah sorry that explainer was partially copy-pasted from a PR that's been up for a while.

I filed mozilla/standards-positions#716 a couple weeks ago, but there's been no activity yet (I suspect @jesup might be OOO)

@a-sully a-sully changed the title FileSystemHandle::remove() for the File System Access API FileSystemHandle.remove() for the File System Access API Jan 17, 2023
@torgo torgo added Venue: WHATWG Review type: Already shipped Already shipped in at least one browser labels Feb 14, 2023
@cynthia cynthia added Progress: review complete Resolution: timed out The TAG has requesed additional information but has not received it Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Review type: small delta labels Feb 14, 2023
@rhiaro
Copy link
Contributor

rhiaro commented Mar 9, 2023

Hi there. We discussed this in our call a couple of weeks ago. We understand that this has already shipped so there probably isn't any more feedback we can usefully give here. We remain concerned about the multi-stakeholder engagement, and what happens if support for this is inconsistent between UAs. We also don't see an answer in the explainer to the questions I left in December, or information in the explainer about the impact this proposal has from a web user's perspective (rather than a site author).

@rhiaro rhiaro closed this as completed Mar 9, 2023
@torgo torgo removed this from the 2023-03-06-week milestone Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing: Multi-stakeholder support Lack of multi-stakeholder support Progress: review complete Resolution: satisfied with concerns The TAG is satisfied with this work overall but requires changes Resolution: timed out The TAG has requesed additional information but has not received it Review type: Already shipped Already shipped in at least one browser Review type: small delta Topic: Filesystem Venue: WHATWG Venue: WICG
Projects
None yet
Development

No branches or pull requests

6 participants