System.SysUtils.FileSearch
Delphi
function FileSearch(const Name, DirList: string): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall FileSearch(const System::UnicodeString Name, const System::UnicodeString DirList);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Searches a specified directory path for a file. The search always starts with the current directory of the current drive.
FileSearch searches through the current directory and the directories passed in the DirList
parameter for a file named Name
.
If FileSearch locates a file matching the Name
parameter, it returns a string specifying a path name for that file. If no matching file exists, FileSearch returns an empty string.
Note:
DirList
is a list of path names delimited by semicolons on Windows, or colons on MacOS.