如何使用 Boost 库将文件的权限更改为只读?
有些问题我已经看过了,比如this和this,但是我还是不知道怎么做,我试过做
boost::filesystem::wpath path = L"abc.txt";
if( boost::filesystem::exists( path ) && 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 */
}
有任何想法吗?