XPRDfopen
Purpose
Synopsis
XPRDfile XPRDfopen(XPRDmosel mosel, const char *fname, int mode, char *errmsg, int msglen);
Arguments
|
mosel
|
Mosel instance
|
||||||||||||
|
fname
|
File name
|
||||||||||||
|
mode
|
Open mode (may be combined):
|
||||||||||||
|
errmsg
|
Buffer to return error message
|
||||||||||||
|
msglen
|
Size of
errmsg
|
Return value
A file descriptor or
NULL in case of failure.
Example
Open file
"myfile" located in the temporary directory of instance
minst for reading in binary mode:
f=XPRDfopen(minst, "tmp:myfile", XPRD_F_BINARY|XPRD_F_INPUT);
Further information
1. The specified file path is relative to the working directory of the Mosel instance performing the file operation.
2. File operations are performed under the restrictions of the Mosel instance. For example, if the remote instance does not have write access, this routine will fail to open a file for writing.
3. Just like accessing files from a Mosel model, any I/O drivers supported by the remote instance can be used with this routine. Drivers "sysfd:",
"tmp:" and
"shmem:" are therefore available.
Related topics
© 2001-2023 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation ("FICO"). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
