3 releases
0.1.9 | Jun 25, 2023 |
---|---|
0.1.8 | May 29, 2023 |
#306 in Windows APIs
62 downloads per month
165KB
703 lines
Contains (Windows DLL, 95KB) Everything64.dll
Everything-rs
This crate provides a safe wrapper around the everything-sys-bindgen
crate.
everything-sys-bindgen
is a rust binding to the Everything SDK that allow IPC communication to the everything service.
The Everything service indexes files on windows and provides a expressive query syntax to search for files.
See the Everything SDK documentation for more information.
See the docs.rs documentation for examples.
lib.rs
:
Everything
This crate provides a safe wrapper around the everything-sys-bindgen
.
everything-sys-bindgen
is a rust binding to the Everything SDK that allow IPC communication to the everything service.
The Everything service indexes files on windows and provides a expressive query syntax to search for files.
See the Everything SDK documentation for more information.
Example
use everything_rs::{Everything, EverythingRequestFlags, EverythingSort, EverythingError};
fn main() -> Result<(), EverythingError> {
let mut everything = Everything::new();
everything.set_search("test");
everything.set_request_flags(
EverythingRequestFlags::FullPathAndFileName
| EverythingRequestFlags::Size
| EverythingRequestFlags::DateCreated
);
everything.set_sort(EverythingSort::DateCreatedDescending);
everything.query()?;
let num_results = everything.get_num_results();
assert!(num_results > 0);
for (i, path) in everything.full_path_iter().flatten().enumerate() {
let size = everything.get_result_size(i as u32)?;
let date_created = everything.get_result_created_date(i as u32)?;
println!("{}: {} {} {}", i, path, size, date_created);
}
Ok(())
}
Dependencies
~0.3–1MB
~23K SLoC