Class: Stream
Lua
C++
Edit

Stream:WriteLine

This method writes a line of text to the stream at the current position.

Syntax

Parameter Description
s value to write

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.