XBinder  Version 2.6.x
Functions
File stream functions.

File stream functions are used for stream operations with files. More...

Functions

EXTERNRT int rtxStreamFileAttach (OSCTXT *pctxt, FILE *pFile, OSUINT16 flags)
 Attaches the existing file structure pointer to the stream. More...
 
EXTERNRT int rtxStreamFileOpen (OSCTXT *pctxt, const char *pFilename, OSUINT16 flags)
 Opens a file stream. More...
 
EXTERNRT int rtxStreamFileCreateReader (OSCTXT *pctxt, const char *pFilename)
 This function creates an input file stream using the specified file name. More...
 
EXTERNRT int rtxStreamFileCreateWriter (OSCTXT *pctxt, const char *pFilename)
 This function creates an output file stream using the file name. More...
 

Detailed Description

File stream functions are used for stream operations with files.

Function Documentation

◆ rtxStreamFileAttach()

EXTERNRT int rtxStreamFileAttach ( OSCTXT pctxt,
FILE *  pFile,
OSUINT16  flags 
)

Attaches the existing file structure pointer to the stream.

The file should be already opened either for the reading or writing. The 'flags' parameter specifies the access mode for the stream - input or output.

Parameters
pctxtPointer to a context structure variable that has been initialized for stream operations.
pFilePointer to FILE structure. File should be already opened either for the writing or reading.
flagsSpecifies the access mode for the stream:
  • OSRTSTRMF_INPUT = input (reading) stream;
  • OSRTSTRMF_OUTPUT = output (writing) stream.
Returns
Completion status of operation: 0 = success, negative return value is error.

◆ rtxStreamFileCreateReader()

EXTERNRT int rtxStreamFileCreateReader ( OSCTXT pctxt,
const char *  pFilename 
)

This function creates an input file stream using the specified file name.

Parameters
pctxtPointer to a context structure variable that has been initialized for stream operations.
pFilenamePointer to null-terminated string that contains the name of file.
Returns
Completion status of operation: 0 = success, negative return value is error.

◆ rtxStreamFileCreateWriter()

EXTERNRT int rtxStreamFileCreateWriter ( OSCTXT pctxt,
const char *  pFilename 
)

This function creates an output file stream using the file name.

Parameters
pctxtPointer to a context structure variable that has been initialized for stream operations.
pFilenamePointer to null-terminated string that contains the name of file.
Returns
Completion status of operation: 0 = success, negative return value is error.

◆ rtxStreamFileOpen()

EXTERNRT int rtxStreamFileOpen ( OSCTXT pctxt,
const char *  pFilename,
OSUINT16  flags 
)

Opens a file stream.

The 'flags' parameter specifies the access mode for the stream - input or output.

Parameters
pctxtPointer to a context structure variable that has been initialized for stream operations.
pFilenamePointer to null-terminated string that contains the name of file.
flagsSpecifies the access mode for the stream:
  • OSRTSTRMF_INPUT = input (reading) stream;
  • OSRTSTRMF_OUTPUT = output (writing) stream.
Returns
Completion status of operation: 0 = success, negative return value is error.