home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / posix / sys / stat / chmod.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  706 b   |  40 lines

  1. @node chmod, file system
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <sys/stat.h>
  6.  
  7. int chmod(const char *path, mode_t mode);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function changes the mode (writable or write-only) of the specified
  13. file.  The value of @var{mode} can be a combination of one or more of
  14. the following:
  15.  
  16. @table @code
  17.  
  18. @item S_IRUSR
  19.  
  20. Make the file readable
  21.  
  22. @item S_IWUSR
  23.  
  24. Make the file writable
  25.  
  26. @end table
  27.  
  28. Other @code{S_I*} values could be included, but they will be ignored.
  29.  
  30. @subheading Return Value
  31.  
  32. Zero if the file exists and the mode was changed, else nonzero. 
  33.  
  34. @subheading Example
  35.  
  36. @example
  37. chmod("/tmp/dj.dat", S_IWUSR|S_IRUSR);
  38. @end example
  39.  
  40.