write
Call Signature
Section titled “Call Signature”write(
this,fd,buffer,offset,length,cb?):void
Defined in: src/node/async.ts:314
Write buffer to the file specified by fd.
Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback.
Parameters
Section titled “Parameters”unknown
number
buffer
Section titled “buffer”Uint8Array
Uint8Array containing the data to write to the file.
offset
Section titled “offset”number
Offset in the buffer to start reading data from.
length
Section titled “length”number
The amount of bytes to write to the file.
Callback<[number, Uint8Array<ArrayBufferLike>]>
The number specifies the number of bytes written into the file.
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”write(
this,fd,buffer,offset,length,position?,cb?):void
Defined in: src/node/async.ts:315
Write buffer to the file specified by fd.
Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback.
Parameters
Section titled “Parameters”unknown
number
buffer
Section titled “buffer”Uint8Array
Uint8Array containing the data to write to the file.
offset
Section titled “offset”number
Offset in the buffer to start reading data from.
length
Section titled “length”number
The amount of bytes to write to the file.
position?
Section titled “position?”number
Offset from the beginning of the file where this data should be written. If position is null, the data will be written at the current position.
Callback<[number, Uint8Array<ArrayBufferLike>]>
The number specifies the number of bytes written into the file.
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”write(
this,fd,data,cb?):void
Defined in: src/node/async.ts:324
Write buffer to the file specified by fd.
Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback.
Parameters
Section titled “Parameters”unknown
number
FileContents
Callback<[number, string]>
The number specifies the number of bytes written into the file.
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”write(
this,fd,data,position?,cb?):void
Defined in: src/node/async.ts:325
Write buffer to the file specified by fd.
Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback.
Parameters
Section titled “Parameters”unknown
number
FileContents
position?
Section titled “position?”number
Offset from the beginning of the file where this data should be written. If position is null, the data will be written at the current position.
Callback<[number, string]>
The number specifies the number of bytes written into the file.
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”write(
this,fd,data,position,encoding,cb?):void
Defined in: src/node/async.ts:326
Write buffer to the file specified by fd.
Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback.
Parameters
Section titled “Parameters”unknown
number
FileContents
position
Section titled “position”number | null
Offset from the beginning of the file where this data should be written. If position is null, the data will be written at the current position.
encoding
Section titled “encoding”BufferEncoding
Callback<[number, string]>
The number specifies the number of bytes written into the file.
Returns
Section titled “Returns”void