Search a file in searchpath.
Source position: dosh.inc line 111
function FSearch( |
path: PathStr; |
dirlist: shortstring |
):PathStr; |
FSearch searches the file Path in all directories listed in DirList. The full name of the found file is returned. DirList must be a list of directories, separated by semi-colons. When no file is found, an empty string is returned.
Remark: | On Unix systems, DirList can also be separated by colons, as is customary on those environments. |
None.
|
Expand a relative path to an absolute path. |
program Example10; uses Dos; { Program to demonstrate the FSearch function. } var s:pathstr; begin s:=FSearch(ParamStr(1),GetEnv('PATH')); if s='' then WriteLn(ParamStr(1),' not Found in PATH') else Writeln(ParamStr(1),' Found in PATH at ',s); end.