Cold Help System: Programming: ColdC Reference Manual: Functions: File: fchmod()


INTEGER fchmod(STRING mode[, STRING file])

This function changes the mode of a file or directory. The mode is an octal number constructed by logically OR-ing the following values:

4000set-user-ID-on-execution
2000set-group-ID-on-execution
1000sticky bit, see the unix manual on chmod
0400read by owner
0200write by owner
0100execute (or search for directories) by owner
0070read, write, execute/search by group
0007read, write, execute/search by others

The read, write, and execute/search values for group and others are en- coded as described for owner. Example:

fchmod("0644", "home.html")
=> 1

If the RESTRICTIVE_FILES option has been compiled into the driver, sticky and setuid/setgid bits cannot be changed.


dblog() | execute() | fchmod() | fclose() | feof() | fflush() | file() | files() | fmkdir() | fopen() | fread() | fremove() | frename() | frmdir() | fseek() | fstat() | fwrite()


the Cold Dark