/** * Atomic file write utilities. * * Writes to a temporary file first, then renames to the target path. * This prevents file corruption if the process crashes mid-write. */ /** * Write content to a file atomically. * * Creates a temporary file with random suffix, writes content, then * renames to target path. The rename operation is atomic on POSIX systems. * Cleans up the temporary file if write fails. * * Resolves symlinks to avoid overwriting the link itself (common in dotfile * management setups). Preserves existing file mode, or defaults to 0o600 * (private) for new files. */ declare function atomicWriteFileSync(filePath: string, content: string): void; export { atomicWriteFileSync };