Skip to main content

Module clone

Module clone 

Source
Expand description

Clone of a store tree into vendor/, the hot path of the install. macOS/APFS: clonefile(2) of the whole directory (one syscall, copy-on-write, measured 8x faster than extraction in M0). Elsewhere, or if clonefile fails (other FS, different volume): recursive walk with hardlinks (pnpm model), and a real copy as a last resort. Always towards an ABSENT destination (the caller removes the previous version first), so no mixed states.

Functionsยง

clone_tree