pub fn write_to_target(
content: &[u8],
target: &OutputTarget,
overwrite: bool,
) -> Result<(), OutputError>Expand description
Write output to target (stdout or file) with atomic file writes
For file targets, this uses atomic write semantics:
- Write to a temporary file in the same directory
- Sync to disk for durability
- Rename to final path (atomic on POSIX systems)
§Arguments
content- The bytes to writetarget- Where to write (stdout or file path)overwrite- If true, overwrite existing files; if false, error on existing
§Errors
Returns OutputError on I/O failures, missing directories, or file exists conflicts