user310291
user310291

Reputation: 38180

Red has no open function like Rebol?

I want to read 10 lines from the end of a big text file without loading the whole file in memory.

I wanted to try to use Open as explained here for Rebol In Rebol, what is the idiomatic way to read a text file line by line?

But Red doesn't have open function ?

Upvotes: 0

Views: 160

Answers (2)

rebolek
rebolek

Reputation: 1301

Red doesn't have open function yet. Full IO support is planned for 0.7.0. So you have to either wait or use OS calls directly.

Upvotes: 1

sqlab
sqlab

Reputation: 6436

You can try a read/lines/seek/part %yourfile offset blocksize

But I have no clue. You have to test and adapt your offset and blocksize.

Upvotes: 1

Related Questions