BloombergLP::bdls::FilesystemUtil::write

Write numBytes from buffer to the file with descriptor.

Synopsis

Declared in <bdls_filesystemutil.h>

static
int
write(
    FileDescriptor descriptor,
    void const* buffer,
    int numBytes);

Description

Write the specified numBytes from the specified buffer address to the file with the specified descriptor. Return numBytes on success; the number of bytes written if space was exhausted; or a negative value on some other error.

Return Value

numBytes on success; the number of bytes written if space was exhausted; or a negative value on error

Parameters

NameDescription
descriptorfile descriptor of the file to write
bufferbuffer from which bytes are written
numBytesnumber of bytes to write