Memento JavaScript Library: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 182: Line 182:


==== ''File'' Methods ====
==== ''File'' Methods ====
:; close(): Close the file. It can subsequently be reopened.
:; readAll(): Reads all lines of the file, and then closes the file
:; readAll(): Reads all lines of the file, and then closes the file
::; Returns: Array containing the lines of the file
::; Returns: Array containing the lines of the file
:; readChar(): Reads the next character from the file stream
::; Returns: The character


:; readLine(): Reads the next line from the file stream
:; readLine(): Reads the next line from the file stream
Line 190: Line 196:
:; readLines(): Reads the remaining lines from the file stream
:; readLines(): Reads the remaining lines from the file stream
::; Returns: Array containing the remaining lines of the file
::; Returns: Array containing the remaining lines of the file
:; readChar(): Reads the next character from the file stream
::; Returns: The character


:; write(text): Write string(s). Take a variable number of arguments, converts each argument to a string, and writes that string to the file stream.
:; write(text): Write string(s). Take a variable number of arguments, converts each argument to a string, and writes that string to the file stream.


:; writeLine(text): Write strings and a newline to the file stream
:; writeLine(text): Write strings and a newline to the file stream
:; close(): Close the file. It can subsequently be reopened.


==== ''File'' Properties ====
==== ''File'' Properties ====