NSFileHandle notifications revisited
NSFileHandle notifications revisited
- Subject: NSFileHandle notifications revisited
- From: Andreas Monitzer <email@hidden>
- Date: Thu, 2 Aug 2001 14:50:52 +0200
[displaying log files like tail -f does in an NSTextView]
I've now downloaded the tail source, and that's what a tail -f does
(simplified):
int ch;
FILE *fp;
for (;;) {
while ((ch = getc(fp)) != EOF) {
putchar(ch);
}
[wait 1 sec]
}
Well, not something I'd consider a clean code, but I'll do it that way.
andy
--
"He was addicted to life. But we cured him"