title: Os.File.setPermission is not recognized as a function
body: <p>I have this (partial) main JS code:</p>
  
  <pre><code>Cu.import("resource://gre/modules/osfile.jsm");
  [...]
  // if it is a Win environment put the attrib file to hidden
  OS.File.setPermission(
          OS.Path.join(OS.Constants.Path.homeDir,  'my_file.txt'),
              {
                  winAttributes: {
                      hidden: true
                  }
              }
  ).then(x =&gt; console.log('success',x), y =&gt; console.log('failure',y));
  </code></pre>
  
  <p>I am testing it on Linux, and when the execution reaches the promise indicated above, it is reported this error:</p>
  
  <blockquote>
    <p><em>console.log: TypeError: OS.File.setPermission is not a function</em></p>
  </blockquote>
  
  <p>I suppose this effect also indicates that the execution of that part on an add-on target Windows platform is compromised, isn't it?</p>
  
  <p>Why does it happen? Where am I wrong? Thanks.</p>
  
  <p><a href="https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/OSFile.jsm/OS.File_for_the_main_thread#OS.File.setPermissions" rel="nofollow">Here the reference for setPermission</a></p>