|-
| width='120' | '''Signatures'''
|{{Func|file:write-binary|$path as xs:string, $value as xs:anyAtomicType|empty-sequence()}}<br />{{Func|file:write-binary|$path as xs:string, $value as xs:anyAtomicType, $offset as xs:integer|empty-sequence()}}<br />
|-
| '''Summary'''
|Writes a binary item (xs:base64Binary, xs:hexBinary) to the specified file. If the file already exists, it will be overwritten.<br />If {{Code|$offset}} is specified, data will be written to this file position. An existing file may be resized by that operation.
|-
| '''Errors'''
|{{Error|FILE0003|#Errors}} the parent of specified path is no directory.<br />{{Error|FILE0004|#Errors}} the specified path is a directory.<br />{{Errors|FILE0006|#Errors}} is the offset is negative, or it exceeds the current file size.<br />{{Error|FILE9999|#Errors}} the operation fails for some other reason.<br />
|}