Class: Stream
Lua
C++
Edit

Stream:ReadLine

This method reads a line of text from the stream.

Syntax

Returns

Returns a line of text from the stream.

Example

path = GetPath(PATH_DOCUMENTS) .. "/temp.txt"

-- Write a new file
stream = WriteFile(path)
if stream == nil then
    print("Failed to write file.")
    return
end

stream:WriteLine("Hello, world!")
stream:Close()

stream = ReadFile(path)
Print(stream:ReadLine())
Copyright © 2024 Ultra Software.
All rights reserved.