It is a library which compare two directories or two files asynchronously through tokio and return true in case that both are different. Useful to create watchers in the servers
toml
spielrs_diff = "0.2"
```rust use spielrsdiff::dirdiff;
async fn shouldreturntrueifbothdirtreearedifferent() { let diff = dirdiff( "./mocks/dirone".tostring(), "./mocks/dirthree".tostring(), ) .await; asserteq!(diff, true); } ```
```rust use spielrsdiff::{filediff, diff::FileDiff};
async fn shouldreturntrueifbothfilesarenotequal() { let diff = filediff(FileDiff { file: "./mocks/dirone/vlang/purpose/purpose.txt".tostring(), filecomp: "./mocks/dirfive/vlang/purpose/purpose.txt".tostring(), }) .await; assert_eq!(diff, true); } ```
Spielrs Diff is MIT licensed. See license