writeSync

external fun writeSync(fd: Number, buffer: ArrayBufferView, offset: Double? = definedExternally, length: Double? = definedExternally, position: Double? = definedExternally): Double(source)

For detailed information, see the documentation of the asynchronous version of this API: {@link write}.

Since

v0.1.21

Return

The number of bytes written.

Parameters

position='null'


external fun writeSync(fd: Number, string: String, position: Double? = definedExternally, encoding: BufferEncoding? = definedExternally): Double(source)

Synchronously writes string to the file referenced by the supplied file descriptor, returning the number of bytes written.

Parameters

fd

A file descriptor.

string

A string to write.

position

The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.

encoding

The expected string encoding.