UNPKG

@alwatr/node-fs

Version:

Enhanced file system operations in Node.js with asynchronous queue to prevent parallel writes.

25 lines 637 B
/** * Enhanced read File (Synchronous). * * @param path - file path * @returns file content * @example * ```typescript * const fileContent = readFileSync('./file.txt', sync); * ``` */ export declare function readFileSync(path: string): string; /** * Enhanced read File (Asynchronous). * * - If writing queue is running for target path, it will wait for it to finish. * * @param path - file path * @returns file content * @example * ```typescript * const fileContent = await readFile('./file.txt', sync); * ``` */ export declare function readFile(path: string): Promise<string>; //# sourceMappingURL=read-file.d.ts.map