• 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: 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

  • Follow-Ups:
    • Re: [NSFileHandle isOpen]?
      • From: Programmingkid <email@hidden>
References: 
 >[NSFileHandle isOpen]? (From: Programmingkid <email@hidden>)

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