Sign in Join
FPDoc Onlineexperiment

TFileSearcher.OnFileFound property

Member of TFileSearcherpublicIn unit FileUtil

Event handler signalled when a file matching the file mask is found in the Search method.

Declaration

pascal
property OnFileFound: TFileFoundEvent read FOnFileFound write FOnFileFound;

Description

OnFileFound is a TFileFoundEvent property with the event handler signalled when a file matching the search criteria is found in the Search method. It is signalled for each file that matches the search path and file mask arguments passed to the method. The event occurs after values in the Path, FileInfo, and Level properties have been updated in the file iterator.

An application must implement and assign an object procedure to the handler to respond to the event notification. The FileIterator argument is the TFileIterator instance for the event notification, and allows access to its properties and methods. Call the Stop method in FileIterator to stop the search process.

Use OnDirectoryFound to respond to directory names found in the Search method.

Use OnDirectoryEnter to respond to a new directory processed in the Search method.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.