qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SetFAttr Procedure
  Summary Details Example                                   Back
 
  Arguments
 
    file_variable    Typed, untyped, or text file; assigned, not open
 
    attributes       Word expression representing new attributes
 
  Description
 
    The SetFAttr procedure changes the attributes of a file. SetFAttr
    permanently changes the DOS directory entry for the file.
 
    The file_variable argument must be associated with an unopened file
    of any type. Use the Assign procedure to associate a file name with
    file_variable.
 
    The attributes argument passes the attribute specification. To
    specify an attribute, pass one or more values. The Dos unit defines
    the possible attribute values as constants. The constant
    representing a normal file is Archive.
 
    Pass more than one file attribute to SetFAttr by using the
    predefined constants, the plus operator (+), and AND, OR, and NOT.
    For example, to set both the read-only and the archive bits:
 
       SetFAttr( file_variable, ReadOnly + Archive );
 
    SetFAttr reports error conditions in DosError as defined in the Dos
    unit. If no error occurred, SetFAttr sets DosError to 0. Possible
    error values are 3, "path not found," and 5, "file access denied."