UNPKG

fs-nextra

Version:

Node.js fs next-gen extra (nextra) methods.

13 lines (12 loc) 613 B
/// <reference types="node" /> import { WriteOptions, BaseEncodingOptions } from './writeFileAtomic'; /** * Writes a file to disk, creating all directories needed to meet the filepath provided atomically. * @function outputFileAtomic * @memberof fsn/nextra * @param file The path to the file you want to create * @param data The data to write to file * @param options The write options or the encoding string. * @returns {Promise<void>} */ export declare function outputFileAtomic(file: string, data: string | Buffer | Uint8Array, options?: WriteOptions | BaseEncodingOptions): Promise<void>;