We recommend using Visual Studio 2017

File Permission Constants

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at File Permission Constants.

Syntax

  
#include <sys/stat.h>  
  

One of these constants is required when _O_CREAT (_open, _sopen) is specified.

The pmode argument specifies the file's permission settings as follows.

ConstantMeaning
_S_IREADReading permitted
_S_IWRITEWriting permitted
_S_IREAD | _S_IWRITEReading and writing permitted

When used as the pmode argument for _umask, the manifest constant sets the permission setting, as follows.

ConstantMeaning
_S_IREADWriting not permitted (file is read-only)
_S_IWRITEReading not permitted (file is write-only)
_S_IREAD | _S_IWRITENeither reading nor writing permitted

_open, _wopen
_sopen, _wsopen
_umask
Standard Types
Global Constants

Show: