Spielrs Diff

Crate Info API Docs Discord Chat

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

How install it

  1. add the dependency in the Cargo.toml file of the project: toml spielrs_diff = "0.2"

Example

Dir comparation

```rust use spielrsdiff::dirdiff;

[tokio::test]

async fn shouldreturntrueifbothdirtreearedifferent() { let diff = dirdiff( "./mocks/dirone".tostring(), "./mocks/dirthree".tostring(), ) .await; asserteq!(diff, true); } ```

File comparation

```rust use spielrsdiff::{filediff, diff::FileDiff};

[tokio::test]

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); } ```

License

Spielrs Diff is MIT licensed. See license