| [Overview][Constants][Types][Procedures and functions][Variables][Index] | 
Search for file in search path.
Source position: unix.pp line 133
| 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.
| #rtl.unixutil.FNMatch | 
 | 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.