Can XULRunner browser delete local file?

95 Views Asked by At

Our company's browser is based on XULRunner. And I create a temp file(a *.url file exactly) for open a link through local default browser, with the flag TmpD. But I want to delete it after it have been opened.

I found some info here but no help~
https://developer.mozilla.org/en-US/Add-ons/Code_snippets/File_I_O

I know it may be involved in some security affairs.
However I am curious about that since it can create a local file, why it not be able to delete a local file?

1

There are 1 best solutions below

2
da-chiller On

However I am curious about that since it can create a local file, why it not be able to delete a local file?

XULrunner indeed IS able to.

That depends on how the your browser was implemented. XULrunner comes along with different libraries, fe. the one you already mentioned in your link (nsIFile). XULrunner software can also use external or self-made addons, plugins, extensions, you name it.

But check this out: nsIFile Object #remove

If this is "save" depends on how save you implement it.