I'm afraid the File System plugin must use async operations. It is not possible to use synchronous file system operations either in the browser or in our desktop wrappers.
We went through a similar process years ago with the WebStorage plugin, which used to use a synchronous browser storage API, which then got replaced with the Local Storage plugin which is asynchronous (and uses IndexedDB internally). Yes, async logic can be harder to work with, but it's necessary. We've also made various improvements over the years to better handle it, like with 'Wait for previous actions to complete', async functions in event sheets, and so on. People also then adapted how they use storage - rather than lots of individual keys, a popular option now is just to use a Dictionary with multiple keys and save/load it all in one go, which is much easier to deal with.
You used to even be able to do things like synchronous network requests - nobody seriously considers that now, and it's widely seen as a mistake, and a terrible idea to keep using it. Storage usually responds quicker than the network, but IIRC I've seen data showing there's a long tail of devices where storage is shockingly slow - perhaps it's ancient hardware, perhaps it's failing, perhaps the system is busy in the background, but I do think it's naive to assume "storage always responds quickly and so synchronous is fine". All modern software uses asynchronous access for the network and most uses asynchronous access for storage - it's the best way, and, well, in this case outside of NW.js it's the only way. So my main point is this is the modern and proper way of doing it anyway.
To address a few of the other points:
- You have to 'List contents' even for known directories like "<documents>"
Why would the app know what's on disk without checking?
- 'Has file/folder' cannot be done with a folder path afaik, you have to 'List contents' again if you want a subfolder.
I guess it could work recursively, but then that is potentially a very slow operation if it is going to end up reading through a lot of folders. That kind of thing definitely cannot be synchronous.
- To read any file, you need another event, 'On file operation complete'
That's just like with AJAX requests. You can also use the 'Wait for previous actions to complete' action and then read the data in the next action after that.
I think the export option should have a "Bundle with WebView2 Version"
It does - see the docs on fixed distribution modes.