[example]Reading files one byte at a time

Questions about GP commands and how to do things

Moderators: MSandro, MSandro, MSandro

Post Reply
Posts: 322
Joined: Jul 2nd, '17, 13:47

[example]Reading files one byte at a time

Post by SimpleSi » Jan 26th, '18, 09:25

Just putting this here for anyone wanting to use the new filestream blocks to read large files

There is no end-of-file boolean available but if the byte read has a nil value then we can assume that we've read the whole file

Posts: 322
Joined: Sep 11th, '15, 14:42

Re: [example]Reading files one byte at a time

Post by JohnM » Feb 9th, '18, 17:08

Thanks for the example!

Yes, if "read byte" returns nil, it means you've gotten to the end of the file.

Post Reply