1

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:

#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!

MD3728
  • 11
  • 2
  • There's no built-in method. You can use an external application and run it via nativeMessaging. It's possible an application like this already exists. – wOxxOm Mar 18 '23 at 22:26
  • So this (writing files) is impossible even in the extension's own folder? If so, then I will try to use nativeMessaging. Thank You. – MD3728 Mar 18 '23 at 23:08

0 Answers0