public interface TextWriter extends AutoClosable:
Text writer contract.
A TextWriter is not tied to the filesystem. Concrete implementations such as FileWriter or SocketWriter provide the actual backing resource.
import klyn.io
try writer = FilePath("message.txt").openWriter():
writer.writeLine("hello")| Modifier and Type | Member | Description |
|---|---|---|
| public | writewrite(readonly value as String) as Void throws IOException |
Writes raw text. |
| public | writeCharwriteChar(readonly c as Char) as Void throws IOException |
Writes one character. |
| public | writeLinewriteLine(readonly line as String) as Void throws IOException |
Writes one line and appends a newline. |
| public | writeLineswriteLines(readonly lines as List<String>) as Void throws IOException |
Writes all lines with trailing newline. |