UNPKG

@hugsylabs/hugsy

Version:

🐧 Hugsy - Configuration management for Claude Code. Transform complex settings into simple, shareable team standards.

33 lines 997 B
/** * File operations utilities with atomic writes and transaction support */ export interface FileOperation { path: string; content: string | object; } export interface TransactionResult { success: boolean; error?: Error; rolledBack?: boolean; } export declare class FileOperations { /** * Atomically write content to a file * Writes to a temporary file first, then renames to target */ static atomicWrite(filePath: string, content: string | object): Promise<void>; /** * Execute multiple file operations as a transaction * Either all succeed or all are rolled back */ static transaction(operations: FileOperation[]): Promise<TransactionResult>; /** * Safely read a file with a default value */ static safeRead<T>(filePath: string, defaultValue: T): Promise<T>; /** * Check if a file exists */ static exists(filePath: string): Promise<boolean>; } //# sourceMappingURL=file-operations.d.ts.map