/** * Clean up stale temp files left behind by crashed/killed processes. * Removes temp files older than maxAgeMs (default: 5 minutes). */ export declare function cleanupStaleTempFiles(directory: string, maxAgeMs?: number): Promise<{ cleaned: string[]; errors: string[]; }>; /** * Synchronous version for use during shutdown. * Uses maxAgeMs=0 by default to clean all temp files. */ export declare function cleanupStaleTempFilesSync(directory: string, maxAgeMs?: number): { cleaned: string[]; errors: string[]; }; /** * Atomically write content to a file using temp + rename pattern. * Safe against process crashes and concurrent writes to the same file. * * How it works: * 1. Creates parent directories if they don't exist * 2. Writes content to a hidden temp file in the same directory * 3. Renames temp file to target (atomic on POSIX systems) * 4. Cleans up temp file if any step fails */ export declare function atomicWriteFile(filePath: string, content: string | Buffer, encoding?: BufferEncoding): Promise; //# sourceMappingURL=atomic-write.d.ts.map