Search for file in search path.
Source position: unix.pp line 169
function FSearch( |
const path: RawByteString; |
dirlist: RawByteString; |
CurrentDirStrategy: TFSearchOption |
):RawByteString; |
const path: RawByteString; |
dirlist: RawByteString |
):RawByteString; |
const path: UnicodeString; |
dirlist: UnicodeString; |
CurrentDirStrategy: TFSearchOption |
):UnicodeString; |
const path: UnicodeString; |
dirlist: UnicodeString |
):UnicodeString; |
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.