[Overview][Constants][Types][Procedures and functions][Variables][Index] |
Returns True if Filename exists in the specified Path.
Source position: lazfileutils.pas line 71
function FileIsInPath( |
const Filename: string; |
const Path: string |
):Boolean; |
Filename |
|
File name to locate. |
Path |
|
Path used for the operation. |
True when the file exists in the specified path.
FileIsInPath is a Boolean function which indicates if the file name exists in the specified path. Filename is the file name to locate, and may include optional relative path information. For example: '../filename.txt'.
Path is the directory name used to locate the specified file. For example: '/usr/lib/fpc'.
The returns value is True when Filename is a file or directory somewhere below Path. For example, under UNIX the file name '/usr/lib/fpc' is below Path '/usr/lib', '/usr' and '/'. When Filename and Path contain the same value, the return value is False. Please note: the return value is False when Path contains an empty string ('').
FileIsInPath calls ResolveDots to resolve relative path information in both Filename and Path, and ensures that a trailing path delimiter is included in Path when needed. FileIsInPath calls CompareFileNames.
Remark: | This is a logical test; FileIsInPath does not expand or follow symbolic links. |
Version 3.2 | Generated 2024-02-25 | Home |