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.

    • Optional cb: Callback<[number, Uint8Array]>

    Returns void

  • Parameters

    • fd: number
    • buffer: Uint8Array
    • offset: number
    • length: number
    • Optional position: number
    • Optional cb: Callback<[number, Uint8Array]>

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

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

    Returns void