Function write

  • 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

    • fd: number
    • buffer: Uint8Array

      Uint8Array containing the data to write to the file.

    • offset: number

      Offset in the buffer to start reading data from.

    • length: number

      The amount of bytes to write to the file.

    • Optionalcb: Callback<[number, Uint8Array]>

      The number specifies the number of bytes written into the file.

    Returns void

  • Parameters

    • fd: number
    • buffer: Uint8Array
    • offset: number
    • length: number
    • Optionalposition: number
    • Optionalcb: Callback<[number, Uint8Array]>

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • fd: number
    • data: FileContents
    • position: null | number
    • encoding: BufferEncoding
    • Optionalcb: Callback<[number, string]>

    Returns void