Sign in Join
FPDoc Onlineexperiment

PathIsInPath function

In unit LazFileUtils

Checks whether the specified directory exists in a given path.

Declaration

pascal
function PathIsInPath(const Path: string; const Directory: string)
: Boolean

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.

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:\'.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.