'Need to get file I/O feature in WebExtensions

I'm developing a WebExtensions addon. I need to access the file system in order to read/write from a file. I have explored WebExtensions:

https://developer.mozilla.org/en-US/Add-ons/WebExtensions

but can't find any such API. Is it possible? or anybody did a workaround?



Solution 1:[1]

Unless your use case allows you to just use the storage API, for file system access, you have to use Native Messaging. This will still require your users to install a separate executable provided by you (in addition to the add-on code which can communicate with the executable).

You might take a look at my extension webappfind, though it is currently OSX only, for an idea on how to do so (mine uses Node.js). It isn't super easy, but at least NativeMessaging provides a way to do so.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Brett Zamir