Помогите!
Как вывести на экран атрибуты файла?
uses Dos;
var
f: file;
attr: Word;
c: string;
begin
c := 'my_file.asd';
Assign(f, c);
GetFAttr(f, attr);
if DosError <> 0 then
WriteLn('Dos error code = ', DosError)
else
begin
Writeln('File: ',c);
Writeln('Attribute = ', attr);
{ Determine file attribute type
using flags in Dos unit }
if attr and ReadOnly <> 0 then
WriteLn('read only file');
if attr and Hidden <> 0 then
WriteLn('hidden file');
if attr and SysFile <> 0 then
WriteLn('system file');
if attr and VolumeID <> 0 then
WriteLn('volume ID');
if attr and Directory <> 0 then
WriteLn('directory name');
if attr and Archive <> 0 then
WriteLn('archive (normal file)');
end; { else }
end.