public FileReader(filePath as Path, encoding as String = "utf-8"):
Creates a reader on the given file path.
| Parameter | Description |
|---|---|
filePath | File path to read from. |
encoding | Text encoding. Only UTF-8 is currently supported. |
try reader = FileReader(Path("notes.txt"), encoding="utf-8"):
print(reader.read())