This should be pretty straightforward. Just use the origin private file system. See here: https://web.dev/file-system-access/#accessing-the-origin-private-file-system
The downside of course is that this does not exist on all browsers. But we have the WebCacheFs as a fallback.
https://web.dev/file-system-access/#accessing-the-origin-private-file-system