如何知道并返回一个文件的所具有的所有属性?(10分)

L

ldelphi

Unregistered / Unconfirmed
GUEST, unregistred user!
如何知道并返回一个文件的所具有的所有属性?
 
已经知道那个文件的路径和名字
 
procedure TFMForm.Properties1Click(Sender: TObject);
var
Attributes: Word;
ReadOnly:Boolean;
Archive:Boolean;
System:Boolean;
Hidden:Boolean;
begin
Attributes := FileGetAttr('你的文件名');
{ read file attributes }
ReadOnly := (Attributes and SysUtils.faReadOnly) = faReadOnly;
Archive := (Attributes and faArchive) = faArchive;
System := (Attributes and faSysFile) = faSysFile;
Hidden:= (Attributes and faHidden) = faHidden;
end;
 
多人接受答案了。
 
顶部