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

PathIsInPath

Checks whether the specified directory exists in a given path.

Declaration

Source position: lazfileutils.pas line 72

function PathIsInPath(

  const Path: string;

  const Directory: string

):Boolean;

Arguments

Path

  

Path examined in the routine.

Directory

  

Directory name to locate in the specified path.

Function result

True when Directory exists in Path.

Description

PathIsInPath is a Boolean function used to determine if the specified Directory exists in the Path argument. The return value is False when Path contains an empty string (''), or when the Directory does not exist in Path.

PathIsInPath calls the CompareFilenames routine to determine the return value for the function.

Remark: PathIsInPath ensures that a trailing path delimiter is included in the Path and Directory arguments prior to performing its comparison. On Windows, this results in a Path like 'C:' being treated as if it contains 'C:\'.

Version 3.2 Generated 2024-02-25 Home