Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.28 KB

file-permission-constants.md

File metadata and controls

42 lines (32 loc) · 1.28 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: File Permission Constants
File Permission Constants
11/04/2016
S_IWRITE constant
constants [C++], file attributes
S_IREAD constant
file permissions [C++]
_S_IWRITE constant
_S_IREAD constant
593cad33-31d1-44d2-8941-8af7d210c88c

File permission constants

Syntax

#include <sys/stat.h>

Remarks

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

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

Constant Meaning
_S_IREAD Reading permitted
_S_IWRITE Writing permitted
`_S_IREAD _S_IWRITE`

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

Constant Meaning
_S_IREAD Writing not permitted (file is read-only)
_S_IWRITE Reading not permitted (file is write-only)
`_S_IREAD _S_IWRITE`

See also

_open, _wopen
_sopen, _wsopen
_umask
Standard types
Global constants