IFile.GetAttributes

Syntax

GetAttributes(FileName: String): FileAttributes;

Parameters

FileName — path and name of the file, which attributes must be obtained.

Description

The GetAttributes method returns attributes of the file passed by the FileName parameter.

Example

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 the example, the "i" variable contains attributes of the file C:\New_Folder\1.txt converted into an integer format.

See also:

IFile