File.Flush Method

Flushes a file's buffered output; any buffered output is immediately written to the file.

bool Flush()

Return Value

True on success or use_valve_fs specified with OpenFile, otherwise false on failure.