[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
_chmod() Change Access Mode of File
#include <dos.h>
int _chmod(filename,func[,attrib]);
char *filename; Name of existing file
int func; Operation to perform
int attrib; Attribute constant
_chmod() can either retrieve or set the attributes of the file
specified by 'filename'. If 'func' is set to 0, _chmod() gets the
current attributes. If 'func' is set to 1, the attribute is set to
'attrib'. 'attrib' can be one of the following constants:
FA_RDONLY Read only attribute
FA_HIDDEN Hidden file
FA_SYSTEM System file
Returns: If successful, _chmod() returns the file attribute word.
On failure, a -1 is returned and 'errno' (defined in
<stdlib.h>) is set to either:
ENOENT Path or file name not found
EACCES Permission denied
See Also:
access()
chmod()
open()
unlink()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson