WICG / file-system-access

Expose the file system on the user’s device, so Web apps can interoperate with the user’s native applications.
https://wicg.github.io/file-system-access/
Other
654 stars 65 forks source link

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

Open xieyuheng opened 1 year ago

xieyuheng commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 https://github.com/whatwg/fs/issues/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

jimmywarting commented 1 year ago

Looking forward to having this!

a-sully commented 1 year ago

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