[Jslib] Antwort: Re: Executing unix command ( such as ls ) from the jslib
pete at mozdevgroup.com
Wed Apr 8 07:26:26 PDT 2009
> var file = new File("/home/pawan/text.txt").
> It creates file named test.txt in home of user pawan....
> function createFile()
> include (jslib_file);
> var file = new File("test.txt");
> file.write("This is a first file created by browser\n");
Creates the file ...
> This program I am using to create file ...but it does not create file..I
> don't know y ...May be its creating the file from where firefox is
> But how to create file in my chrome://somename/content/
> I want to create file in this folder....
You need permission to write to the chrome dir.
Also, in most cases "chrome://somename/content" is a mapped resource
that points to a jar archive and is not a file on the filesystem.
Usually for files you want to create and write to, you would place them
in the mozilla/firefox profile dir which is a place you have permission
to write to.
Pete Collins - Founder, Mozdev Group Inc.
Mozilla Software Development Solutions
More information about the Jslib