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