Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 232: | Line 232: | ||
:: Object file | :: Object file | ||
=== | === Object File === | ||
This object is returned file () function and provide access to the requested file. If the file specified in the file () function name does not exist yet, but it will be created. After a read or write the file should be closed function close (). | |||
==== | |||
==== Methods ==== | |||
:Reads all lines of the file, and then closes the file. | ; readAll() | ||
: Reads all lines of the file, and then closes the file. | |||
:Read a line. | |||
; readLine() | |||
:Read the remaining lines in the file and return them in an array. | : Read a line. | ||
:Read a character. | ; readLines() | ||
: Read the remaining lines in the file and return them in an array. | |||
:Write strings. This function takes a variable number of arguments, converts each argument to a string, and writes that string to the file. | |||
; readChar() | |||
:Write strings and a newline. | : Read a character. | ||
:Close the file. It may be reopened. | ; write(text) | ||
: Write strings. This function takes a variable number of arguments, converts each argument to a string, and writes that string to the file. | |||
; writeLine(text) | |||
: Write strings and a newline. | |||
; close() | |||
: Close the file. It may be reopened. | |||
====Свойства==== | ====Свойства==== | ||
; exists : true - if and only if the file denoted by this object exists; false otherwise | ; exists : true - if and only if the file denoted by this object exists; false otherwise |