clearerr


Description:

[ CCode ( cname = "clearerr" ) ]
public void clearerr ()

Resets the error flags and the GLib.FileStream.EOF indicator for the given file stream.

Example: Reset the error flags and the GLib.FileStream.EOF indicator:

public static int main (string[] args) {
// open an existing file for reading:
FileStream stream = FileStream.open ("test.txt", "r");
assert (stream != null);

// trigger an error by writing:
stream.puts ("data");
assert (stream.error () != 0);

// resets error, eof:
stream.clearerr ();

// Continue

return 0;
}

valac --pkg glib-2.0 GLib.FileStream.clearerr.vala