Is it possible to delete a file with Firefox add-ons?

firefox, firefox-addon, javascript

Solution

Yes, either using `nsIFile.remove` or `OS.File.remove` or the SDK's `"io/file".remove`.

Problem

I know it's possible to make a Firefox add-on that can create, read, and write files, but is it possible to create an add-on that can delete a file after reading it?

Original source