Anybody know how to get the following code to work? It's from: https://web.dev/file-system-access/#accessing-the-origin-private-file-system
const root = await navigator.storage.getDirectory();
const fileHandle = await root.getFileHandle('Untitled.txt', { create: true });
Ultimately I'm trying to gain access to the origin directory to store files created by my Blazor site. I prefer the origin directory because it doesn't require user interaction and is somewhat protected from the user.
Absolutely not to be confused with the key/pair 'localstorage' feature. I'm talking about genuine file access.
Here is a basic sample of creating/writing/reading a simple text file.
And a live sample: https://blazorrepl.telerik.com/mmkAQgPL05sNJ72w42