Crate rsure [−] [src]
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 update
.
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.
Structs
BkStore |
A |
BkSureFile |
Information about a single revision stored in a single file in a Bitkeeper repository. |
PrintVisitor |
A visitor that just prints out the changes, textually, to a given writer. |
Progress | |
StoreVersion |
Information about a given version in the store. |
SureTree |
Represents a single directory entity. The |
Enums
CompareAction | |
CompareType | |
Version |
Indicator of which version of sure data to load. |
WeaveError |
Traits
CompareVisitor | |
Store |
Something that can store and retrieve SureTrees. |
SureHash | |
TreeCompare | |
TreeUpdate |
Functions
bk_setup |
Initialize a new BitKeeper-based storage directory. The path should
name a directory that is either empty or can be created with a single
|
parse_store |
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. |
scan_fs | |
show_tree | |
stderr_visitor |
A |
stdout_visitor |
A |
update |
Perform an update scan, using the given store. |
Type Definitions
Error | |
Result | |
StoreTags |
Tags are just key/value pairs. Both key and value should be printable strings. |