11.1.10 AsFile Method
Writes the binary data to a file specified by the provided path.
If no path is provided, a temporary file will be created and the path returned.
Input Arguments
Name | Type | Mandatory | Description |
|---|---|---|---|
Path | String | No | The path to the output file. If no path is provided, a temporary file will be created, and the path will be returned. |
Append | Boolean | No | A Boolean value that indicates what to do when the output file already exists. If Append is true, the binary data will be appended at the end of the existing data, otherwise the existing data will be discarded. |
Output Arguments
Name | Type | Mandatory | Description |
|---|---|---|---|
ErrorInfo | No | Indicates an error that might have occurred. |
Return Value
The path of the file. If the Path argument is provided, the same value will be returned. If the Path argument is not provided, the path to the temporary file will be returned.
Examples
Write to a temporary file and store to a BLOB field.
Define_Com Class(#XPRIM_Binary) Name(#Data)
. . .
#STD_BLOB := #Data.AsFile