5 local f
= QFile('tmp_file')
6 print('open file => ', f
:open
{'WriteOnly'})
7 print('write to file => ', f
:write(s
))
8 print('flush file =>', f
:flush())
9 print('close file => ', f
:close())
10 print('reopen file =>', f
:open
{'ReadOnly'})
11 print('correct read => ', f
:readAll()==s
)