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

Feature request: FileSystemHandle.move() for directories #413

Open
xieyuheng opened this issue May 13, 2023 · 4 comments
Open

Feature request: FileSystemHandle.move() for directories #413

xieyuheng opened this issue May 13, 2023 · 4 comments

Comments

@xieyuheng
Copy link

It seems not less-secure then be able to delete and create files and directories.

Since we already can delete and create, why not move?

@xieyuheng
Copy link
Author

xieyuheng commented May 13, 2023

P.S.

I am asking this question, because I made a text editor with File System Access API:
https://readonly.link/editor

But it feels incomplete without supporting renaming files and directories.

@a-sully
Copy link
Collaborator

a-sully commented May 15, 2023

move() for local files should be available on recent versions of Chromium. See the explainer: https://github.com/whatwg/fs/blob/main/proposals/MovingNonOpfsFiles.md

Directory moves were not feasible for a long time due to infrastructural inconsistencies that made it impossible to specify the behavior in a way that was compatible across browsers (see whatwg/fs#59). Those questions were recently addressed, though, so there's now at least a path to supporting directory moves in the future

For now I'll turn this issue into a feature request to track interest for directory moves

@a-sully a-sully changed the title Why FileSystemHandle.move() (outside of the OPFS) is behind a flag and is not supported for directories? Feature request: FileSystemHandle.move() for directories May 15, 2023
@jimmywarting

This comment was marked as resolved.

@a-sully
Copy link
Collaborator

a-sully commented Jun 20, 2023

note: directory moves are still not supported on Chromium browsers. Re-opening this issue to track this feature request

@a-sully a-sully reopened this Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants