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
669 stars 66 forks source link

Allow delete of file from OPFS while still open via access handle #339

Open alshamma opened 3 years ago

alshamma commented 3 years ago

Web apps may create temporary files that are meant to be deleted when they are implicitly closed. That is, when a tab closes, these temporary files should not be persisted.

Perhaps the behavior should be similar to the posix unlink function.

mkruisselbrink commented 3 years ago

I think support for temporary files in some manner might make sense, yes (see also my reply to #340). Not sure that allowing removing of a file while it is open/locked is the way I'd approach this. I'd rather just not have the file exists in a directory to begin with, which seems like it should address the same use case?

And storage buckets with a session scoped lifetime might also help here (although we'd have to define what session scoped actually means, i.e. does it delete data on tab closure, or on browser closure, or something else...)

a-sully commented 1 year ago

A related issue was just filed on the Storage Buckets spec: https://github.com/WICG/storage-buckets/issues/44