FileSearchUTF8 function
Searches for a file with the specified name in the list of directory paths.
Declaration
function FileSearchUTF8(const Name: string; const DirList: string;
ImplicitCurrentDir: Boolean=True): stringArguments
Name | File name to locate in the list of directory paths. |
DirList | The delimited list of directory paths to search. |
ImplicitCurrentDir |
Function result
Path and file name for the matching file, or an empty string.
Description
FileSearchUTF8 is a
String function used to search for
files with the specified name in the list of directory paths.
DirList is a list of file paths to search in the function. Values
in DirList are separated by the
PathSeparator character for the
environment. No additional directories are searched when DirList contains an
empty string ('').
ImplicitCurrentDir controls whether the search is implicitly
limited to the current directory. The default value for ImplicitCurrentDir is
True. When a file with the specified Name is located in the current
directory, no additional searches are needed. The return value is the name of
the file without any path information.
When ImplicitCurrentDir is False, each path in DirList is searched for a file with the specified name. The search is stopped when the first file with the specified file name is found. The return value contains the path in DirList where the file name was located along with the file name, or an empty string ('') if the specified file is not found in the search.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
