Skip to content

writeFile

writeFile(this, filename, data, cb?): void

Defined in: src/node/async.ts:194

Asynchronously writes data to a file, replacing the file if it already exists.

The encoding option is ignored if data is a buffer.

unknown

PathLike

FileContents

Callback

void

encoding Defaults to 'utf8'.

mode Defaults to 0644.

flag Defaults to 'w'.

writeFile(this, filename, data, encoding?, cb?): void

Defined in: src/node/async.ts:195

Asynchronously writes data to a file, replacing the file if it already exists.

The encoding option is ignored if data is a buffer.

unknown

PathLike

FileContents

BufferEncoding

Callback

void

encoding Defaults to 'utf8'.

mode Defaults to 0644.

flag Defaults to 'w'.

writeFile(this, filename, data, options?, cb?): void

Defined in: src/node/async.ts:196

Asynchronously writes data to a file, replacing the file if it already exists.

The encoding option is ignored if data is a buffer.

unknown

PathLike

FileContents

WriteFileOptions

Callback

void

encoding Defaults to 'utf8'.

mode Defaults to 0644.

flag Defaults to 'w'.