Condukt.Sandbox.Sync (Condukt v3.0.0)

Copy Markdown View Source

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.

Summary

Functions

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

Functions

mirror(from, from_path, to, to_path, opts \\ [])

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