Function writeSync

  • For detailed information, see the documentation of the asynchronous version of this API: write.

    Parameters

    • fd: number
    • buffer: ArrayBufferView
    • Optional offset: number
    • Optional length: number
    • Optional position: number

    Returns number

    The number of bytes written.

    Since

    v0.1.21

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

    Parameters

    • fd: number

      A file descriptor.

    • string: string

      A string to write.

    • Optional position: number

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

    • Optional encoding: BufferEncoding

      The expected string encoding.

    Returns number

Generated using TypeDoc