file-system-access icon indicating copy to clipboard operation
file-system-access copied to clipboard

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

Open alshamma opened this issue 4 years ago • 2 comments

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.

alshamma avatar Oct 20 '21 17:10 alshamma

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...)

mkruisselbrink avatar Nov 02 '21 18:11 mkruisselbrink

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

a-sully avatar Jan 13 '23 02:01 a-sully