johnjohndoe / LineReader

Reading a text file line by line aka block wise.
88 stars 27 forks source link

Consider <NSFastEnumeration> conformance #4

Open davedelong opened 13 years ago

davedelong commented 13 years ago

It'd be an interesting thing to make FileReader conform to <NSFastEnumeration>, so you could do:

FileReader *r = [[FileReader alloc] initWithFilePath:pathToFile];
for (NSString *line in r) {
  NSLog(@"line: %@", line);
}
[r release];
johnjohndoe commented 13 years ago

I like the idea. Though, I am not sure when I can implement it since I do not have a Mac at home - only at work.