[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'LazFileUtils' (#lazutils)

FilenameExtIn

Determines if the file name uses one of the specified file extensions.

Declaration

Source position: lazfileutils.pas line 38

function FilenameExtIn(

  const Filename: string;

  Exts: array of string;

  CaseSensitive: Boolean = False

):Boolean;

Arguments

Filename

  

File name examined in the routine.

Exts

  

File extensions expected in the file name.

CaseSensitive

  

True to use case-sensitive comparison in the routine.

Function result

Returns True if Filename has one of the specified file extensions.

Description

FilenameExtIn is a Boolean function used to determine if the file name in the Filename parameter uses one of the file extension in Exts.

Exts is an array type with the file extensions expected in the routine. Values in Exts can contain the '.' (Period) character in the extension, but it is not required.

CaseSensitive indicates if case-sensitivity is used when comparing the parameter values. When set to True, the comparison is limited to characters in the ASCII character set. StrLComp or StrLIComp is called to compare the value in Filename to the values in Exts.

The return value is True when Filename uses one the file extension in Exts. The return value is False when Filename is an empty string (''), does not include a '.' character that marks the start of the file extension, or does not use one of the values in Exts.

See also

FilenameExtIs

  

Determines if Filename has the specified file extension.


Version 3.2 Generated 2024-02-25 Home