public read() as String throws IOException
Reads the whole text content of this path.
This helper is intended for small or medium text files. Use FileReader directly when you need streaming, line-by-line processing, or explicit control over the reader lifetime.
Complete text content of the file.
import klyn.io
path = Path.tempDir.resolve("notes.txt")
path.write("Hello")
assert path.read() == "Hello"