GetAttributes(FileName: String): FileAttributes;
FileName — path and name of the file, which attributes must be obtained.
The GetAttributes method returns attributes of the file passed by the FileName parameter.
Sub UserProc;
Var
i: Integer;
Begin
If File.Exists("c:\New_folder\1.txt") Then
i:=File.GetAttributes("c:\New_folder\1.txt");
End If;
End Sub UserProc;
After executing the example, the "i" variable contains attributes of the file C:\New_Folder\1.txt converted into an integer format.
See also: