how create and write file on the Linux. code which i use in windows not work in Linux, thanks.
[code=html]
function writeFile( filename, content)
{
try
{
var file = Components.classes[“@mozilla.org/file/local;1”].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath( filename );
var outputStream = Components.classes[“@mozilla.org/network/file-output-stream;1”].createInstance( Components.interfaces.nsIFileOutputStream );
outputStream.init( file, 0x04 | 0x08 | 0x20, 420, 0 );
var result = outputStream.write( content, content.length );
outputStream.close();
}
catch(err){}
}