title: How to change file permissions using the Boost library?
body: <p>How can I use the Boost library to change the permissions of a file to read-only?</p>
  
  <p>There are some questions that I have already seen, such as <a href="http://www.boost.org/doc/libs/1_49_0/libs/filesystem/v3/doc/reference.html#last_write_time" rel="nofollow">this</a> and <a href="http://www.boost.org/doc/libs/1_49_0/libs/filesystem/v3/doc/reference.html#symlink_perms" rel="nofollow">this</a>, but I still don't know how to do it, I have tried doing</p>
  
  <pre><code>boost::filesystem::wpath path = L"abc.txt";
  if( boost::filesystem::exists( path ) &amp;&amp; boost::filesystem::is_regular_file( path ) )
  {
      boost::filesystem::file_status s = boost::filesystem::status( path );
      /* here I need to set file permissitons to READ ONLY for `path` file */
  }
  </code></pre>
  
  <p>Any ideas?</p>