Getfattr.PAS

Language:
Русский
English

  {Getfattr.PAS}
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 {Sample code for the GetFAttr procedure.}

  uses WinDos,WinCrt;

 var
   F: file;
   Attr: Word;
 begin
   { Get file name from command line }
   Assign(F, ParamStr(1));
   GetFAttr(F, Attr);
   Writeln(ParamStr(1));
   if DosError <> 0 then
     Writeln('DOS error code = ', DosError)
   else
   begin
     Write('Attribute = ', Attr);
     { Determine file attribute type using flags in WinDos unit }
     if Attr and faReadOnly <> 0 then
       Writeln('Read only file');
     if Attr and faHidden <> 0 then
       Writeln('Hidden file');
     if Attr and faSysFile <> 0 then
       Writeln('System file');
     if Attr and faVolumeID <> 0 then
       Writeln('Volume ID');
     if Attr and faDirectory <> 0 then
       Writeln('Directory name');
     if Attr and faArchive <> 0 then
       Writeln('Archive (normal file)');
   end; { else }
 end.

Тэги:
| G+
Код для вставки: :: :: :: ::
Поделиться: // //