• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [NSFileHandle isOpen]?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSFileHandle isOpen]?


  • Subject: Re: [NSFileHandle isOpen]?
  • From: Programmingkid <email@hidden>
  • Date: Sat, 12 Feb 2011 11:17:32 -0500

On Feb 12, 2011, at 4:12 AM, Quincey Morris wrote:

> 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;
> 	}
>
>

I actually have thought about doing it that way. I am sure there is a better way. _______________________________________________
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

  • Follow-Ups:
    • Re: [NSFileHandle isOpen]?
      • From: "A.M." <email@hidden>
References: 
 >[NSFileHandle isOpen]? (From: Programmingkid <email@hidden>)
 >Re: [NSFileHandle isOpen]? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: [NSFileHandle isOpen]?
  • Next by Date: Re: [NSFileHandle isOpen]?
  • Previous by thread: Re: [NSFileHandle isOpen]?
  • Next by thread: Re: [NSFileHandle isOpen]?
  • Index(es):
    • Date
    • Thread