UNPKG

@paultaku/node-mock-server

Version:

A TypeScript-based mock server with automatic Swagger-based mock file generation

29 lines 800 B
/** * File Reader Utility * * Wrapper around fs-extra for file read operations. * Provides a consistent interface for file reading across all domains. */ /** * Read file content as a string */ export declare function readFile(filePath: string, options?: { encoding?: BufferEncoding; }): Promise<string>; /** * Read and parse JSON file */ export declare function readJson<T = unknown>(filePath: string): Promise<T>; /** * Check if a path is a directory */ export declare function isDirectory(dirPath: string): Promise<boolean>; /** * Check if a path is a file */ export declare function isFile(filePath: string): Promise<boolean>; /** * List files in a directory */ export declare function readDirectory(dirPath: string): Promise<string[]>; //# sourceMappingURL=file-reader.d.ts.map