Add a FileSystemFileHandle copy method #159
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
I am currently building a web based image editor/viewer. The user should be able to copy photos / files in the editor.
The problem I am having right now is that there is no
copy
method I can find in the file system api. There are functions likeremove
andmove
which work in Chrome but no copy method.I can currently create a copy of a file by basically creating an empty file and copying the content of the original file however this destroys the files last modified metadata. When it comes to photos especially that have no EXIF metadata destroying the last modified date metadata can be very unfortunate.
Is there any plans on supporting a copy method that retains the last modified time? Thank you for your awesome work :D
What solutions exist today?
You can create a new file and copy content from original -> new by using
createWritable
but this destroys metadata.For FileSystemHandle there is a move method that doesn't destroy the metadata but in my case I don't want to affect the original file.
How would you solve it?
Add a copy method to FileSystemHandle or at least to FileSystemFileHandle that copies a file just like in the underlying OS preserving the last modified date.
Anything else?
No response
The text was updated successfully, but these errors were encountered: