[#BloombergLP-bdls-FilesystemUtil-write] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::write :relfileprefix: ../../../ :mrdocs: Write `numBytes` from `buffer` to the file with `descriptor`. == Synopsis Declared in `<bdls_filesystemutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int write( xref:BloombergLP/bdls/FilesystemUtil/FileDescriptor.adoc[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 [cols="1,4"] |=== | Name| Description | *descriptor* | file descriptor of the file to write | *buffer* | buffer from which bytes are written | *numBytes* | number of bytes to write |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#