FwriteFileSync
Bun

function

fs.writeFileSync

function writeFileSync(
data: string | ArrayBufferView<ArrayBufferLike>,
): void;

Returns undefined.

The mode option only affects the newly created file. See open for more details.

For detailed information, see the documentation of the asynchronous version of this API: writeFile.

@param file

filename or file descriptor

Referenced types

type WriteFileOptions = ObjectEncodingOptions & Abortable & { flag: string; flush: boolean; mode: Mode } | BufferEncoding | null