package b0
Module B00_rsyncSource
rsync support.
Source
val get_cmd :
?search:B0_std.Fpath.t list ->
?cmd:B0_std.Cmd.t ->
unit ->
(B0_std.Cmd.t, string) Stdlib.resultget_cmd () looks for rsync with B0_std.Os.Cmd.get.
Source
val copy :
?opts:B0_std.Cmd.t ->
?stats:bool ->
?progress:bool ->
delete:bool ->
?src_host:string ->
src:B0_std.Fpath.t ->
?dst_host:string ->
B0_std.Fpath.t ->
(unit, string) Stdlib.resultcopy ~src dst copies the contents of directory src to dst with rsync. As per rsync semantics, directoryness of src is important (dst's one is not):
- If
srchas a trailing directory separator, the contentssrc/*is copied todst/*. - If
srchas no trailing directory separator, the contents ofsrc/*is copied todst/$(basename src)/*.
src_host and dst_host specify the host for source and destination directory (e.g. "myhost:"). They default to "".
If delete is true, deletes files at destination that do not exist in src. If stats is true (default to false) outputs statistics about the transfer. If progress is true (default) outputs progress about the transfer. opts defaults to -azh, this means transfer in archive mode which preserves symlinks and file attributes and compression is enabled.