FileTools[Text]
ReadLine
read a line from a file
Calling Sequence
Parameters
Description
Examples
ReadLine(file)
file
-
file descriptor or filename
The ReadLine(file) command reads a string containing all the characters from the current file position to the first newline character or the end of file. The characters are returned as a string.
If the current file position is the end of the file, a call to ReadLine returns NULL, but ReadLine does not automatically close file. This behavior is different from readline.
FileToolsTextWriteLine⁡testfile,This is a test
15
FileToolsTextWriteLine⁡testfile,This is also a test
20
FileToolsTextClose⁡testfile
FileToolsTextReadLine⁡testfile
This is a test
This is also a test
FileToolsRemove⁡testfile
See Also
FileTools[Remove]
FileTools[Text][Close]
FileTools[Text][Open]
FileTools[Text][WriteLine]
FileTools[Text][WriteString]
IO_errors
readline
Download Help Document