Function writeSync

  • If buffer is a plain object, it must have an own (not inherited) toStringfunction property.

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

    Since

    v0.0.67

    Returns

    The number of bytes written.

    Parameters

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

    Returns number

  • 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

  • If buffer is a plain object, it must have an own (not inherited) toStringfunction property.

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

    Since

    v0.0.67

    Returns

    The number of bytes written.

    Parameters

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

    Returns number

  • 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