_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

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster