Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Implement move capability for directory sharing #1064

@ibeckermayer

Description

@ibeckermayer

Currently, successfully fulfilling a TDP SharedDirectoryMoveRequest is unimplemented (the user will see an error modal) because (source)

The FileSystemHandle.move() method has shipped for files within the origin private file system (OPFS), is behind a flag for files if the source or destination is outside of the OPFS, and is not yet supported for directories.

One option for resolving this is to implement a move "manually" by (source):

creating a new file/directory, copying over data (recursively, in the case of a directory), and removing the original

however

This process is slow, error prone (e.g. disk full), and can require re-uploading files in some cases.

Ideally we will be able to use an inbuilt FileSystemHandle.move() method. The tracking issue appears to be whatwg/fs#10, and the closest thing I've found to a launch date is "relatively soon": WICG/file-system-access#50 (comment) (June 6, 2022)

See 53510cc for an implementation that should be close to working when the feature is added to browsers.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions