Closed jimmywarting closed 2 years ago
This is an interesting idea, but there are a few reasons I can think of why this might not be feasible:
I'm hopeful that we'll get move()
landed soon, which will at least allow for more convenience across the local file system / OPFS boundary
@a-sully I'd like this to be re-opened.
This is the only high performance file-system standard for the web platform, and it needs to be capable of working with what users have, which, in many cases will include symlinks.
All web-modified files should have safe browsing checks run and the Mark-of-the-Web added to be saved to disk. Files written to the OPFS are not subject to these checks. Creating a symlink from a local file to a file in the OPFS would bypass these checks
What would stop us from just enable "safe browsing checks" on just some few file/folder/symbolic links parts in the OPFS? it would be no different than just saving it to the IndexedDB?
the hole OPFS can have safe-browsing check disabled by default but reading the content of an symbolic link saved in OPFS by a other picker would have safe-browsing check on
on just this files
It would be pretty sweet if you could create a symbolic link from a file or folder handle accessed from the picker and then put them into the sandboxed file system
navigator.storage.getDirectory
you can also avoid having to copy over all the data from a user directory over to the sandboxed filesystem. or creating a IndexedDB and save this handles.
having this wold make working with both a user directory and sandboxed files more seamless together