# `Condukt.Sandbox.Sync`
[🔗](https://github.com/tuist/tuist/blob/condukt@3.0.0/condukt/lib/condukt/sandbox/sync.ex#L1)

One-way mirrors of a directory from one sandbox to another, as a session
with a Linux sandbox and a Mac beside it keeps the Mac's worktree current
before the Mac runs a command (see `Condukt.Sandbox.Lazy`'s `:before_use`).

A mirror streams the source directory through `Condukt.Sandbox.export/3`
into `Condukt.Sandbox.import_archive/4`, so nothing is held in memory.
With `clean: true` the target directory is emptied first, so files deleted
at the source go at the target too; otherwise the mirror only adds and
overwrites. Each mirror copies the whole directory: exclude what the
target rebuilds, such as `.build` or `DerivedData`.

# `mirror`

Mirrors `from_path` in `from` to `to_path` in `to`. Options: `:exclude`
(`tar --exclude` patterns, such as `".git"`), `:clean`, and `:timeout`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
