seems that if display File in quickrt then its size is zero, and can not read anything
from doc: [Login to see the link]
Return value
Returns the same File value if the operation succeeded or raises an error.
local file = sys.File("Hello.txt")
-- open the file for writing, using default "binary" encoding
file:open("write")
file:write("Hello World")
file:close()
test file:
c:\>echo Hello World > Hello.txt
c:\>dir Hello.txt
2023/09/20 09:09 14 Hello.txt
```
using `file:open()` :
c:>quickrt
► file = sys.File("Hello.txt")
► file:open()
{
...
position = -2,
size = 0,
}
► file.size
0
► c = file:read()
► type(c)
"string"
► #c
0
► file.size
0
► file.position
-2
using `file = file:open() `:
c:>quickrt
► file = sys.File("Hello.txt")
► file = file:open()
► file.size
11
► file.position
-1
► c = file:read()
► type(c)
"string"
► #c
13
► file.size
11
► file.position
13
I find that examples/ui/binary.wlua not work, so I check that code, and come to this problem.
another one : canvas/mandelbrot.wlua can not exit. wluart.exe always exist after close window.