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 - symlink_
like_ unzip - A symbolic link the way
unzip(Composer’s extractor) leaves one: on macOS the link’s own mode is 0777 (fchmodatwithout following), where a plainsymlink()gets the umask applied; Linux ignores link modes.