/** * Enhanced write file (Synchronous). * * - If directory not exists, create it recursively. * - Write file to `path.tmp` before write success. * - If file exists, renamed (keep) to `path.bak`. * - If write failed, original file will not be changed. * * @param path - file path * @param content - file content * @example * ```typescript * writeFileSync('./file.txt', 'Hello World!'); * ``` */ export declare function writeFileSync(path: string, content: Buffer | string): void; /** * Enhanced write file (Asynchronous). * * - If directory not exists, create it recursively. * - Write file to `path.tmp` before write success. * - If file exists, renamed (keep) to `path.bak`. * - If write failed, original file will not be changed. * * @param path - file path * @param content - file content * @example * ```typescript * await writeFile('./file.txt', 'Hello World!'); * ``` */ export declare function writeFile(path: string, content: Buffer | string): Promise; //# sourceMappingURL=write-file.d.ts.map