TFileSearcher class
Implements an iterator used to search for files or directories.
Declaration
TFileSearcher = class(TFileIterator)Inheritance
- TFileSearcher
- TFileIterator
Descends from it: TListDirectoriesSearcher TListFileSearcher
Description
TFileSearcher is a
TFileIterator descendant used to
search for files or directories that match a search mask in a given directory
path. TFileSearcher extends the ancestor class with additional properties,
methods, and events needed to search and process files or directories on the
local file system.
It implements the Search method to perform a search using the
specified path(s) and file mask(s).
Use MaskSeparator to specify the delimiter used to separate a list
of mask values passed to the method. Use PathSeparator to specify
the delimiter used to separate a list of file paths passed to the method.
Use FileAttribute and DirectoryAttribute to specify the
file system attributes needed for files or directories considered a match in
the Search method. Use FollowSymLink to indicate whether symbolic
links on the file system are followed in the Search method.
Use the OnFileFound, OnDirectoryFound, and
OnDirectoryEnter event handlers to perform the actions needed for
files or directories found using the Search method.
TFileSearcher is the ancestor class for more specialized descendants like
TListFileSearcher and TListDirectoriesSearcher.
See also
Properties
MaskSeparator | public | Character used as a delimiter between file masks. |
PathSeparator | public | Character used as a delimiter between directory paths. |
FollowSymLink | public | Indicates if a search process directory paths that are symbolic links. |
FileAttribute | public | File attribute needed for any file considered a match in the Search method. |
DirectoryAttribute | public | File attribute needed for directories considered a match in the Search method. |
CircularLinkdetection | public | Enables or disables detection of circular references when resolving symbolic links. |
Methods
DoDirectoryEnter | protected | Signals the OnDirectoryEnter event handler (when assigned). |
DoDirectoryFound | protected | Signals the OnDirectoryFound event handler (when assigned). |
DoFileFound | protected | Signals the OnFileFound event handler (when assigned). |
DoQueryFileFound | protected | Performs actions needed to accept or reject a file name processed in the Search method. |
DoQueryDirectoryEnter | protected | Performs actions needed to accept or reject a directory name processed in the Search method. |
Create | public | Constructor for the class instance. |
Search | public | Searches for files or directories in the specified path(s) using the specified options. |
Events
OnDirectoryFound | public | Event handler signalled when a new directory is found in the Search method. |
OnFileFound | public | Event handler signalled when a file matching the file mask is found in the Search method. |
OnDirectoryEnter | public | Event handler signalled when a new directory is processed in the Search method. |
OnQueryFileFound | public | Event handler signalled to accept or reject a file name found using the class. |
OnQueryDirectoryEnter | public | Event handler signalled to accept or reject a subdirectory in the Search method. |
Inherited
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
