The official platform agnostic fandro2 libraries – now working in Linux/Windows/MacOSX. No screenshot this time.
github: https://github.com/hooverdirt/fandro2.cli
The major change is the threading model – fandro2 has a Windows specific (now legacy) threading model and to make it portable, I had to change it and use Progress<T> and async patterns.
Example:
using FandroSearch.Finders.Matching;
using FandroSearch.Finders.Threading;
FoldersWordFinder finder = new FoldersWordFinder {
StartFolder = "/path/to/search",
Mask = "*.txt",
Recursive = true,
Pattern = "TODO",
Conditions = new FileFilters { /* optional filters */ }
};
List<SearchReport> results = new List<SearchReport>();
Progress<SearchReport> progress = new Progress<SearchReport>(results.Add);
// do the actual work
await finder.DoWorkAsync(progress, CancellationToken.None);
See also Microsoft’s Async programming page(s) – (C# SDK/pages)