Add File.Flush methodmap (#1056)

This allows us to do FileHandle.Flush() instead of FlushFile(FileHandle) and maintain consistency in always using methodmaps for file I/O operations.
This commit is contained in:
hydrogen-mvm
2019-07-31 22:18:07 +00:00
committed by Nicholas Hastings
parent fb9b284bcf
commit 22635d8d35
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -233,6 +233,13 @@ methodmap File < Handle
// @return True on success, false otherwise.
public native bool Seek(int position, int where);
// Flushes a file's buffered output; any buffered output
// is immediately written to the file.
//
// @return True on success or use_valve_fs specified with OpenFile,
// otherwise false on failure.
public native bool Flush();
// Get the current position in the file; returns -1 on failure.
property int Position {
public native get();