firefox addon - why can't I create file in the folder with xpcom -
i haved created folder , code that
 var file = components.classes["@mozilla.org/file/local;1"]          .createinstance(components.interfaces.nsilocalfile);     var fostream = components.classes["@mozilla.org/network/file-output-stream;1"]              .createinstance(components.interfaces.nsifileoutputstream);  filepath = path;  file.initwithpath(filepath);  if(file.exists() == false ) {    file.create(0x01, 0644);   }   but when create file in folder , there error show that
error: uncaught exception:
[exception... "component returned failure code: 0x80520015 (ns_error_file_access_denied) [nsilocalfile.create]"  nsresult: "0x80520015 (ns_error_file_access_denied)"   anyone can me please?
change directory permissions 0755
Comments
Post a Comment