[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
     NAME: GetFAttr

     USE: This procedure will return the attributes of a file. GetFAttr
     accepts a file variable that has been assigned a valid file name
     but has not been opened and will return the attributes of that file.
     Attribute values are normal Dos attributesand can be compared to the
     Dos unit attribute constants. Errors are reported through DosError.

                      { DOS file attribute bytes }
                         const
                            ReadOnly   = $01;
                            Hidden     = $02;
                            SysFile    = $04;
                            VolumeID   = $08;
                            Directory  = $10;
                            Archive    = $20;
                            AnyFile    = $3F;

     DEPENDENCY:  The DOS unit must be used placed in the uses section.

     SYNTAX: GetFAttr

     EXAMPLE:      Program TestGetFattr;

                   Uses Dos;
                   Var
                      DInfo : SearchRec;

                   Begin
                      FindFirst('*.*',AnyFile,DInfo);
                      While (DosError = ) do
                      Begin
                         Writeln('FileNAME: ',Dirinfo.Name);
                         Writeln('File Attribute: ',DirInfo.Attr);
                         Writeln;
                         FindNext(DInfo);
                      end;
                   end.

See Also: GetFTime SetFAttr SetFTime
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson