How to set file permissions (cross platform) in C++?

前端 未结 8 968
孤城傲影
孤城傲影 2020-11-27 05:08

I am using C++ ofstream to write out a file. I want to set the permissions to be only accessible by the user: 700. In unix; I suppose I can just issue a s

8条回答
  •  眼角桃花
    2020-11-27 05:40

    No idea if it would work, but you could look into using the chmod.exe executable that comes with Cygwin.

提交回复
热议问题