Compare
When this package is the right tool
sync-directory is a Node-local folder mirror: same machine, two paths, optional watch. It is not a remote deploy tool and not a backup system.
| sync-directory | rsync | fs-extra.copy | hand-rolled chokidar | |
|---|---|---|---|---|
| Runs in Node without a binary | Yes | Needs rsync on the host | Yes | Yes |
| Watch + incremental events | Built in | Not the same model | No | You build it |
| Hardlink mode | Yes | Possible with flags | No | You build it |
| exclude + forceSync | Yes, forceSync wins | filters | filter callback | You build it |
| Remote / SSH | No | Yes | No | No |
| Best for | Tooling, local mirrors, plugins | Servers and deploys | One-shot copy | Very custom pipelines |
Copy vs hardlink inside this library
Choose copy when another process watches the target (dev servers, bundlers). Choose hardlink when you want speed and both trees live on the same volume. Hardlinks share inodes; some watchers never emit a change on the target file.