file.readLine

Syntax file.readLine (path)

Params path is a legal path name of a file that is open and from which you wish to read the next line of text.

Action Reads the next line of text from the file at path.

Returns A string containing the next line of text from the file.

Examples file.open ("C:\\Program Files\\Frontier\\sample.txt")
file.readLine ("C:\\Program Files\\Frontier\\sample.txt")

   » "Contents of sample.txt"


file.readLine ("System:System Folder:textfile")

   » "Wyoming"

Notes Repeated calls to file.readLine will read all the text in the file.

Use file.open to open the file before reading; call file.close when you're finished.

Before calling file.readLine, check the result of file.endOfFile. Failure to do so may result in a return value of an empty string.

See Also file.read

file.open

file.endOfFile

file.close

Discuss