next up previous contents index
Next: FStat Up: Functions and procedures Previous: FSStat

FSearch

   

Declaration:

Function FSearch (Path : pathstr;DirList : string) : Pathstr;

Description:

Searches in DirList, a colon separated list of directories, for a file named Path. It then returns a path to the found file.

Errors:

An empty string if no such file was found.

See also:

BaseName, DirName, FExpand

Example
Program Example46;

{ Program to demonstrate the FSearch function. }

Uses linux,strings;

begin
  Writeln ('ls is in : ',FSearch ('ls',strpas(Getenv('PATH'))));
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998