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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -