@paultaku/node-mock-server
Version:
A TypeScript-based mock server with automatic Swagger-based mock file generation
27 lines • 807 B
TypeScript
/**
* File Writer Utility
*
* Wrapper around fs-extra for file write operations.
* Provides a consistent interface for file writing across all domains.
*/
/**
* Write content to a file, creating parent directories if needed
*/
export declare function writeFile(filePath: string, content: string, options?: {
encoding?: BufferEncoding;
}): Promise<void>;
/**
* Write JSON content to a file
*/
export declare function writeJson(filePath: string, data: unknown, options?: {
spaces?: number;
}): Promise<void>;
/**
* Ensure a directory exists, creating it if necessary
*/
export declare function ensureDirectory(dirPath: string): Promise<void>;
/**
* Check if a file exists
*/
export declare function fileExists(filePath: string): Promise<boolean>;
//# sourceMappingURL=file-writer.d.ts.map