Skip to content

writeFileSync

writeFileSync(this, path, data, options?): void

Defined in: src/node/sync.ts:177

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

The encoding option is ignored if data is a buffer.

unknown

PathOrFileDescriptor

FileContents

WriteFileOptions

void

encoding Defaults to 'utf8'.

mode Defaults to 0644.

flag Defaults to 'w'.

writeFileSync(this, path, data, encoding?): void

Defined in: src/node/sync.ts:178

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

The encoding option is ignored if data is a buffer.

unknown

PathOrFileDescriptor

FileContents

BufferEncoding

void

encoding Defaults to 'utf8'.

mode Defaults to 0644.

flag Defaults to 'w'.