conn
is a pointer to the connection descriptor that a previous call to mi_open() or mi_server_connect() established.
LO_hdl
is a pointer to an LO handle of the smart large object to copy.
fname_spec
is a pathname template for the target file that holds the data. This pathname can include special symbols for the filename.
flags
is an integer bitmask that indicates how to open the destination file and where the file is to be located.
size
is the size of the file after mi_lo_to_file() completes the copy.
Yes
MI_O_EXCL
Raise an exception if a file by that name already exists.
MI_O_TRUNC
Truncate the file, if it there.
MI_O_APPEND
Append to the file, if it already exists.
MI_O_RDWR
Open the file in read/write mode.
MI_O_WRONLY
Open the file in write-only mode.
MI_O_BINARY
Process the data as binary data.
MI_O_TEXT
Process the data as text (not binary). (Binary is used if you do not specify MI_O_TEXT.)
MI_O_SERVER_FILE
The fname_spec file is created on the server computer. The file mode is read/write for all users. The file owner is root.
MI_O_CLIENT_FILE
The fname_spec file is created on the client computer. The file mode is zero so that the file uses the client umask permission-mask value. The file owner is the client user identifier.
The default value for the flags argument is the masking of the following flag values:
The following table shows some examples of wildcard substitution when the hexadecimal identifier for the LO handle of a smart large object is 0000000000000019.
x!
x
resume.txt!
resume.txt
x.0000000000000019
?resume
9resume
resume??.txt
resume19.txt
resume???.???
resume000.019
?abc???.???
0abc000.019
???a???.???
000a000.019
???a???.???b
000a000.019b
???a???.???b!
???a???.???b??????????????
???a???.?00b00000000000019
Tip: The mi_lo_to_file() function replaces the mi_large_object_to_file() function, which Informix supports for backward compatibility only. Use mi_lo_to_file() for all new DataBlade routines. Return Values
char *
This character string is the filename that results from the wildcard expansion.
NULL
The function was not successful.