[Overview][Constants][Types][Procedures and functions][Variables] | Reference for unit 'Unix' (#rtl) |
Search for file in search path.
Source position: line 0
function FSearch( |
const path: AnsiString; |
dirlist: Ansistring; |
CurrentDirStrategy: TFSearchOption |
):AnsiString; |
const path: AnsiString; |
dirlist: AnsiString |
):AnsiString; |
FSearch searches in DirList, a colon separated list of directories, for a file named Path. It then returns a path to the found file.
The CurrentDirStrategy determines how the current directory is treated when searching:
It is mainly provided to mimic DOS search path behaviour. Default behaviour is to search the current directory first.
An empty string if no such file was found.
|
Check whether filename matches wildcard specification |
Program Example46; { Program to demonstrate the FSearch function. } Uses BaseUnix, Unix, Strings; begin Writeln ('ls is in : ',FSearch ('ls',strpas(fpGetenv('PATH')))); end.
No notes exist for this page yet.