-
-
Save mdippery/1bb3ddeb6f41bd71d429 to your computer and use it in GitHub Desktop.
A class that mimics `tail -f`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Michael Dippery on 1/12/2011. | |
// Copyright 2011 Michael Dippery. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#include <stdio.h> | |
@interface FileTailer : NSObject | |
{ | |
FILE *in; | |
NSTimeInterval refresh; | |
} | |
- (id)initWithPath:(NSString *)path refreshPeriod:(NSTimeInterval)aRefresh; | |
- (id)initWithStream:(FILE *)fh refreshPeriod:(NSTimeInterval)aRefresh; | |
- (void)readIndefinitely:(void (^)(int ch))action; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment