Documentation
¶
Overview ¶
Package iocopy provides byte-for-byte filesystem copy primitives shared by the eval promote pipeline and the online sampler plugin.
Both callers need the same guarantees: a journal directory copied recursively, regular files preserved bit-for-bit, symlinks not followed, and special files (sockets, devices) skipped. Centralizing the helper here keeps the two callers from drifting and makes the contract auditable in one place.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies src into dst (which is created as needed). Behavior contract:
- Regular files are copied byte-for-byte; mode bits are preserved.
- Directories are created with mode 0o755.
- Symlinks are not followed and not recreated; they are surfaced as an error so callers explicitly decide whether to allow them. Journal directories never contain symlinks, so this is the safe default.
- Special files (sockets, devices, named pipes) are skipped silently.
- dst may exist already; existing files at the same relative path are overwritten. Pre-existing extra files at dst are left untouched — callers wanting a clean target should remove dst first.
On error, CopyDir returns immediately with a wrapped error; partial state at dst is the caller's responsibility to clean up.
Types ¶
This section is empty.