◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The _chmod function changes the permission setting of the file specified by <filename>. The permission setting controls read and write access to the file. The constant expression <pmode> contains one or both of the manifest constants _S_IWRITE and _S_IREAD, defined in SYS\STAT.H. Any other values for <pmode> are ignored. When both constants are given, they are joined with the bitwise-OR operator (|). The meaning of the <pmode> argument is determined by either the _S_IWRITE or _S_IREAD manifest constant. If write permission is not given, the file is read-only. Note that all files are readable; it is not possible to give write-only permission. Thus the modes _S_IWRITE and _S_IREAD | _S_IWRITE are equivalent. Return Value The _chmod function returns the value 0 if the permission setting is successfully changed. A return value of -1 indicates an error; in this case, errno is set to ENOENT, indicating that the specified file could not be found. -♦-