[Overview][Constants][Types][Procedures and functions][Variables] | Reference for unit 'Dos' (#rtl) |
Search a file in searchpath
Source position: dosh.inc line 116
function FSearch( |
path: PathStr; |
dirlist: String |
):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.
No notes exist for this page yet.