context: function CCKWriteInstallJS(destdir){  var file = destdir.clone();  file.append("install.js");  try {    file.remove(false);                           } catch (ex) {  }  var fos = Components.classes["@mozilla.org/network/file-output-stream;1"]                       .createInstance(Components.interfaces.nsIFileOutputStream);  fos.init(file, -1, -1, false);  var ioService=Components.classes["@mozilla.org/network/io-service;1"]    .getService(Components.interfaces.nsIIOService);  var scriptableStream=Components    .classes["@mozilla.org/scriptableinputstream;1"]    .getService(Components.interfaces.nsIScriptableInputStream);  var channel=ioService.newChannel("chrome://cckwizard/content/srcfiles/install.js.in",null,null);  var input=channel.open();  scriptableStream.init(input);  var str=scriptableStream.read(input.available());  scriptableStream.close();  input.close();  str = str.replace(/%id%/g, document.getElementById("id").value);  str = str.replace(/%name%/g, document.getElementById("name").value);  if (haveplugins)    str = str.replace(/%plugins%/g, 'addDirectory("", "%version%", "plugins", cckextensiondir, "plugins", true);');  else    str = str.replace(/%plugins%/g, '');  if (havesearchplugins)    str = str.replace(/%searchplugins%/g, 'addDirectory("", "%version%", "searchplugins", cckextensiondir, "searchplugins", true);');  else    str = str.replace(/%searchplugins%/g, '');      str = str.replace(/%version%/g, document.getElementById("version").value);  fos.write(str, str.length);   fos.close();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/e9a51a32bc6f9b73a6ef72ef8ec7e8b46437de4c/cckwizard.js/clean/extensions/cck/browser/resources/content/cckwizard/cckwizard.js