synchronize remote directories
var sinker = ;var net = ;var dir = processargv2;var server = net;server;
var sinker = ;var net = ;var sink = ;sink;
Now modify the files from the directory given by
process.argv on either
system. The files are in sync! After the initial file exchange, each side
watches the local set of files for changes and propagates any updates to the
other end of the connection.
var sinker =
Create a duplex
sink stream that synchronizes a directory
dir with a remote
false, don't write to any local files. This is "push" mode.
false, don't watch the file system for changes after the initial synchronization exchange
opts.fs- pass in a custom fs implementation. Otherwise the core node fs will be used.
opts.tmpdir- use a custom tmpdir for storing files. Otherwise
When the initial synchronization is complete and the files on the local and remote are in sync, this event fires.
Each time the remote sends a file, this event fires with the
stream of the
stream.meta is the sequence number of the initiating request.
During initial synchronization, an
ops list will be generated with operations
With npm do:
npm install sinker