Rsure is a set of utilities for capturing information about files, and later verifying it is still true.
The easiest way to use Rsure is to build the
rsure executable contained in this crate. This
program allows you to use most of the functionality of the crate.
However, it is also possible to use the crate programmatically. At the top level of the crate as some utility functions for the most common operations.
For example, to scan a directory or do an update use
This example makes use of several of the building blocks necessary to use the store. First is
the store itself.
parse_store is able to decode options that are passed to the command line.
it is also possible to build a
store::Plain store directly.
Next are the tags for the snapshot. Generally, this should hold some kind of information about
the snapshot itself. For the
Plain store, it can be just an empty map. Other store types
may require certain tags to be present.
An iterator that pulls hash from old nodes if the file is unchanged.
The HashUpdater is able to update hashes. This is the first pass.
Information about a given version in the store.
Indicator of which version of sure data to load.
A Source is something that can repeatedly give us an iterator over nodes.
Something that can store and retrieve SureTrees.
A temp file that can spawn multiple loaders.
Initialize the standard logger, based on
Parse a command line specified path to determine the parameters and type of store desired. The path can be the path to a directory. In this case, look at possible filenames to determine the other parameters. The path can also give a filename of one of the surefiles, and we will derive the name information from that.
Perform an update scan, using the given store.
Tags are just key/value pairs. Both key and value should be printable strings.