You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
read(): Integer
Returns integer in range from -1 to 255.
If value that was returned is -1, that means that you reached end of stream.
skip(Integer n): Integer
Skips specified amount of bytes in stream.
Return amount of bytes that was skipped.
reset()
Resets stream position.
close()
Closes stream.
How to use:
localfile=lutils.file();
file:init("test_avatar_folder");
localinput_stream=file:openReadStream("test.txt");
localbyte_array= {};
localb=input_stream:read();
whileb~=-1dobyte_array[#byte_array+1] =b;
b=input_stream:read();
endprint(#byte_array);
-- Will print length of byte array that was read from input streaminput_stream:close();