Salmon
Loading...
Searching...
No Matches
Mku.Utils.FileSearcher Class Reference

Class searches for files in a SalmonDrive by filename. More...

Public Types

enum  SearchEvent { SearchingFiles , SearchingFinished }
 Event status types. More...
 

Public Member Functions

void Stop ()
 Stop all jobs.
 
delegate void OnResultFoundListener (IVirtualFile searchResult)
 Fired when search result found.
 
bool IsRunning ()
 True if a search is running.
 
bool IsStopped ()
 True if last search was stopped by user.
 
IVirtualFile[] Search (IVirtualFile dir, string terms, bool any, OnResultFoundListener OnResultFound, Action< SearchEvent > onSearchEvent)
 Search files in directory and its subdirectories recursively for matching terms.
 

Detailed Description

Class searches for files in a SalmonDrive by filename.

Member Enumeration Documentation

◆ SearchEvent

Event status types.

Enumerator
SearchingFiles 

Searching files.

SearchingFinished 

Searching is complete.

Member Function Documentation

◆ IsRunning()

bool Mku.Utils.FileSearcher.IsRunning ( )

True if a search is running.

Returns
True if running

◆ IsStopped()

bool Mku.Utils.FileSearcher.IsStopped ( )

True if last search was stopped by user.

Returns
True if stopped

◆ OnResultFoundListener()

delegate void Mku.Utils.FileSearcher.OnResultFoundListener ( IVirtualFile searchResult)

Fired when search result found.

Parameters
searchResultThe search result.

◆ Search()

IVirtualFile[] Mku.Utils.FileSearcher.Search ( IVirtualFile dir,
string terms,
bool any,
OnResultFoundListener OnResultFound,
Action< SearchEvent > onSearchEvent )

Search files in directory and its subdirectories recursively for matching terms.

Parameters
dirThe directory to start the search.
termsThe terms to search for.
anyTrue if you want to match any term otherwise match all terms.
OnResultFoundCallback interface to receive notifications when results found.
onSearchEventCallback interface to receive status events.
Returns
An array with all the results found.

The documentation for this class was generated from the following file: