Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 261: | Line 261: | ||
==== Methods ==== | ==== Methods ==== | ||
; readAll() | ; readAll() | ||
: Reads all lines of the file, and then closes the file | : Reads all lines of the file, and then closes the file | ||
:; Returns | |||
:: Array containing the lines of the file | |||
; readLine() | ; readLine() | ||
: Reads a line | : Reads a line from the file | ||
:; Returns: The line | |||
; readLines() | ; readLines() | ||
: Reads the remaining lines in the file | : Reads the remaining lines in the file | ||
:; Returns: Array containing the remaining lines of the file | |||
; readChar() | ; readChar() | ||
: Reads a character | : Reads a character | ||
:; Returns: The character | |||
; write(text) | ; write(text) | ||
Line 276: | Line 281: | ||
; writeLine(text) | ; writeLine(text) | ||
: Write strings and a newline | : Write strings and a newline to the file | ||
; close() | ; close() | ||
Line 282: | Line 287: | ||
==== Properties ==== | ==== Properties ==== | ||
; exists: true - if and only if the file | ; exists: true - if and only if the file exists; false otherwise | ||
; length: The length, in bytes, of the file | ; length: The length, in bytes, of the file, or 0L if the file does not exist. | ||
; getLineNumber: Get the current line number | ; getLineNumber: Get the current line number | ||
:; Returns: The line number, or position, in the file | |||
=== Examples === | === Examples === |