GetAttributes(FileName: String): FileAttributes;
FileName — a path and name of the file, attributes of which should be got.
The GetAttributes method returns attributes of a file, passed by the parameter FileName.
Sub Main;
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 Main;
After executing this example, variable "i" contains attributes of a file c:\New_Folder\1.txt converted to an integer format.
See also: