freopen

A wrapper for the POSIX freopen() function. The freopen() function opens a file and associates it with an existing stream.

See your C library manual for more details about freopen().

void*
freopen
(
string filename
,
string mode
,
void* stream = null
)

Parameters

filename string

a pathname in the GLib file name encoding (UTF-8 on Windows)

mode string

a string describing the mode in which the file should be opened

stream void*

an existing stream which will be reused, or null

Return Value

Type: void*

A FILE* if the file was successfully opened, or null if an error occurred.