# compare

Compare file content with an expected string.

```rhai
compare(path: &str, expected: &str) -> bool
```

## Examples

```rhai
if compare("/etc/hostname", "myserver")? {
    print("Hostname matches");
}
```

```rhai
let expected_config = "port: 8080";
if !compare("/app/config.yaml", expected_config)? {
    file_write("/app/config.yaml", expected_config)?;
}
```
