public write(content as String) as Void throws IOException:
Writes text content to this path, replacing existing file content.
This helper is intended for simple full-file writes. Use FileWriter directly when you need incremental writes, line-oriented output, or explicit control over the writer lifetime.
| Parameter | Description |
|---|---|
content | Text content to write. |
import klyn.io
path = Path.tempDir.resolve("notes.txt")
path.write("Hello")
print(path.read())