Function group Execute on client Platform(s)
FileOps NO All

This function is no longer supported and has been removed from the Functions tab in the Catalog.




Creates and writes the entire file identified by cPath, using the data supplied in binary xVariable. Pathnames can be over 255 characters, which was the limit in Studio 8.0.1 or earlier.

If the file already exists, $writeentirefile() replaces it. The value in xVariable must have the following format:

  1. 12 byte header containing the Type (4 bytes), Creator (4 bytes), and Data fork size (4 bytes).

  2. Data fork information.

  3. Resource fork information.

The size of the data fork determines where the resource fork data is stored, as shown below. Under Windows and Unix, the resource fork is not written.

The function returns an error code, or zero if successful: see the FileOps function error codes.


Do FileOps.$writeentirefile('/omnis/myfile:',lBinary) Returns lError
; writes the contents of the binary variable to the file