[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'FileUtil' (#lcl)

SearchFileInPath

SearchFileInPath - searches for Filename in the given SearchPath using the supplied BasePath with the specified Delimiter and the options listed in Flags

Declaration

Source position: fileutil.pas line 111

function SearchFileInPath(

  const Filename: String;

  const BasePath: String;

  const SearchPath: String;

  const Delimiter: String;

  Flags: TSearchFileInPathFlags

):String;

Arguments

Filename

  

The name of the file for searching

BasePath

  

The BasePath to be used for the search

SearchPath

  

The path for searching

Delimiter

  

The directory Delimiter to be used in the search

Flags

  

Flags specifying how to search: e.g. don't search in base path, case independent search

Function result

Returns fully specified file name of the first file that matches the supplied criteria, or empty string if file not found

Description

SearchFileInPath - searches for Filename in the given SearchPath using the supplied BasePath with the specified Delimiter and the options listed in Flags

Searches the whole path unless the sffDontSearchInBasePath flag is present

Returns the first file that matches the supplied criteria

Errors

If the file does not exist, an empty string is returned

The latest version of this document can be found at lazarus-ccr.sourceforge.net.