Re: [NSFileHandle isOpen]?
Re: [NSFileHandle isOpen]?
- Subject: Re: [NSFileHandle isOpen]?
- From: Quincey Morris <email@hidden>
- Date: Sat, 12 Feb 2011 01:12:56 -0800
On Feb 11, 2011, at 22:23, Programmingkid wrote:
> Is there a way to determine if a NSFileHandle object has been sent a closeFile message?
This is probably the wrong list -- it's more of a Cocoa question than an Xcode question.
It looks like there's no direct way to find out. I can think of two indirect ways which might work depending on what you're trying to do:
1. Subclass NSFileHandle and override 'closeFile'. That way you know for sure.
2. Something hacky like this:
BOOL isClosed = NO;
@try {
[fileHandle fileDescription];
}
@catch (NSException*) exception {
isClosed = YES;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden