Implement File.Size (#2131)
* Implement file size method for already open files * Switch from fseek/ftell to fileno/fstat size reading
This commit is contained in:
@@ -112,6 +112,11 @@ methodmap File < Handle
|
||||
CloseHandle(this);
|
||||
}
|
||||
|
||||
// Get the file size in bytes.
|
||||
//
|
||||
// @return File size in bytes, -1 on error.
|
||||
public native int Size();
|
||||
|
||||
// Reads a line of text from a file.
|
||||
//
|
||||
// @param buffer String buffer to hold the line.
|
||||
|
||||
Reference in New Issue
Block a user