This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ElvishJerricco's profile picture

File seeking

Started by ElvishJerricco, 18 December 2014 - 02:58 PM
ElvishJerricco #1
Posted 18 December 2014 - 03:58 PM
It's a pretty fundamental file IO function. I don't see why we don't already have it.
MKlegoman357 #2
Posted 18 December 2014 - 04:38 PM
So basically more control over what we can do with file handles. Although yes, you could do this if you'd like by saving the file to a table and all but having this feature in-built would be really nice. But I wonder how the file handles might be changed by adding this feature.
ElvishJerricco #3
Posted 18 December 2014 - 07:04 PM
So basically more control over what we can do with file handles. Although yes, you could do this if you'd like by saving the file to a table and all but having this feature in-built would be really nice. But I wonder how the file handles might be changed by adding this feature.

Well saving a file to a table is a bad idea I think. When dealing with large files that's not how you want to do it. For example, Grin's zip library has to hold the entire zip file in memory, when it should just be seeking to requested files as they're requested.