views:

48

answers:

1

I want to provide some functionality through an extension. This requires (read and execute) access to some resource files (an mp3 file, a swf file and two js).

I know user scripts cannot access local files and I need an extension (add-on) to do that.
But can I start by writing a greasemonkey script and compiling it to a xpi?
How should I specify the path to the file for it to work when compiled into an xpi?

This question is close to what I'm trying to do, but does not say anything about the path.
Yet this other question discusses how to add resources to your xpi, but assumes you write the xpi from scratch not if you compile a greasmonkey user script to an xpi

+1  A: 

I am not familiar with greasemonkey, however I have successfully written to files using a FireFox addon. Once you have a FireFox addon which you can modify, you can see the page here: File I/O - MDC for some help writing files via the API in FireFox. I use the nsiFilePicker service to select the file/path.

Alex
was this of any help?
Alex