I need to be able to create and write to a text file inside of the Firefox profile folder repeatedly (a couple times a minute). It is being done through the background script of an extension and it has to be done silently without showing a file explorer prompt. For several other reasons, I can't use the storage api for this.
I have looked through many stack overflow posts (almost all of which are more than 6 years old) that use "Components" (eg. Components.classes) which now appear to be deprecated and unusable as of Firefox 111.
Examples of Answers Already Tried:
- how to create .txt in local file system using Firefox extension
- Firefox Extension Write data to File
#1 completely fails since the require statement doesn't work and #2 fails since the browser no longer recognizes Components.
Also, using fetch with the extension URL (relative) and attempting to write to a text file within the extension folder does not work (no errors occur but nothing is actually written).
Thanks for any help!