3 releases
Uses old Rust 2015
0.1.2 | Nov 14, 2015 |
---|---|
0.1.1 | Nov 14, 2015 |
0.1.0 | Nov 14, 2015 |
#14 in #patch-file
12KB
241 lines
LibRsync
Examples
In the following example, the signature file should be computed on the local file, sent to the remote machine where the delta is computed. Then, delta_file
must be run on the remote machine, creating a file /tmp/delta. Then, /tmp/delta should be copied to the local machine, and finally patch_file
must be applied to write a copy of the remote file in /tmp/new.
extern crate rsync;
use rsync::*;
fn main(){
sig_file("/tmp/old","/tmp/old.sig",2048,8,None).unwrap();
let sig=loadsig_file("/tmp/old.sig",None).unwrap();
delta_file(&sig, "/tmp/new", "/tmp/delta",None).unwrap();
patch_file("/tmp/old","/tmp/delta","/tmp/new.new",None).unwrap();
}
Dependencies
~43KB