A package that wraps Everything SDK API calls using FFI to make them accessible to Dart code.
- " Everything" is a filename search engine for Windows.
- Everything SDK provides a DLL and Lib interface to Everything over IPC.
dart pub add everything_search_engine
import 'package:everything_search_engine/everything.dart';
/// `await Everything.ensureInited()` must be called before `Everything.fromDefaultLibraryPath()` unless you use your own dll library
await Everything.ensureInited();
Everything everything = Everything.fromDefaultLibraryPath();
add flutter asset in pubspec.yaml
if you are using flutter
or flutter_test
flutter:
assets:
- packages/everything_search_engine/src/dll/Everything64.dll
import 'package:everything_search_engine/everything_search_engine.dart';
Future<void> main() async {
/// `await Everything.ensureInited()` must be called before `Everything.fromDefaultLibraryPath()` unless you use your own dll library
await Everything.ensureInited();
final everything = Everything.fromDefaultLibraryPath();
final results = everything.runQuery(
const Query(
search: r'^pubspec\.yaml$',
isMatchPath: false,
isRegex: true,
// isMatchCase: false,
// isMatchWholeWord: false,
requestFlags: RequestFlags(
dateCreated: true,
),
sort: EverythingSort.dateCreatedDescending,
max: 20,
offset: 0,
),
);
// ignore: avoid_print
print(results.items.join('\n'));
}