[][src]Crate summain

File manifests.

This crate defines the ManifestEntry struct to represent an entry in a file manifest. The entry contains data about each file. A manifest can be produced of some data, and later, a new manifest can be produced and compared with the original. If the manifests have changed, the data has changed. If they haven't changed, the data has probably not changed.

Such manifests can be used, for example, to verify that data that has been restored from a backup is the same as what was backed up.

This crate uses Linux metadata of files.

let m = std::fs::metadata(".").unwrap();
let e = summain::ManifestEntry(m);
println!("{}", serde_yaml::to_string(e).unwrap());

The output is something like:

path: "."
mode: drwxrwxr-x
mtime: 1606565867
mtime_nsec: 500355545
nlink: 6
size: ~

Structs

ManifestEntry

An entry in a file manifest.