TextWriter
Streaming text writer returned by utils.OpenTextWriter.
Streaming text writer returned by utils.OpenTextWriter.
Closed: boolean = false
Indicates whether the writer has been closed.
Close()
Closes the file. Calling Close() more than once is allowed.
boolean — true if the writer is closed successfully; false if closing/flushing the file fails. Calling it again after a successful close returns true.
Flush()
Flushes buffered output to the file.
boolean — true on success; false if flushing fails.
Error — If the writer is closed.
Write(content)
Writes text at the current file position without adding a line terminator.
| Name | Type | Description |
|---|---|---|
content | string | Text to write. |
boolean — true on success; false if the text cannot be encoded in the selected codepage or the write fails.
Error — If the writer is closed.
WriteLine(content)
Writes text followed by a CRLF line terminator.
| Name | Type | Description |
|---|---|---|
content | string | Text to write. |
boolean — true on success; false if the text cannot be encoded in the selected codepage or the write fails.
Error — If the writer is closed.