I'm working on a firefox plugin. Part of what I want it to do is when a button is clicked, it write some outp开发者_开发百科ut to a file. The file may not exist, it which case it needs to be created. If the file exists, it needs to be appended to. Is this possible with firefox add-ons?
Of course. See:
https://developer.mozilla.org/en/Code_snippets/File_I%2F%2FO
And:
https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIFile#create%28%29
精彩评论