IPath.HasExtension

Syntax

HasExtension(Path: String): Boolean;

Parameters

Path - path to search extension.

Description

The HasExtension method returns whether file extension exists in a path.

Comments

The method returns True, if a path contains file extension, and False, if it does not.

Example

Sub Main;

Var

Path_File, s: String;

Begin

Path_File:="c:\Work\1.txt";

If Path.HasExtension(Path_File) Then

s:="Yes";

Else

s:="No";

End If;

End Sub Main;

After executing the example, the "s" variable contains Yes, if file extension is contained in a path.

See also:

IPath