• 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: fileExistsAtPath with * to indicate random
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fileExistsAtPath with * to indicate random


  • Subject: Re: fileExistsAtPath with * to indicate random
  • From: Keith Duncan <email@hidden>
  • Date: Mon, 10 Mar 2008 22:18:21 +0000

I tried BOOL ImageMagick = [[NSFileManager defaultManager] fileExistsAtPath:@"/ImageMagick*/" isDirectory:YES];

You're calling that wrong, the second parameter expects a pointer to a BOOL, not an actual BOOL. The correct syntax is:


BOOL directory;
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:@"/ ImageMagick/" isDirectory:&directory];


But anyway, you're probably best getting the directory contents of where ImageMagick should be installed and running through it. I'm not familiar with ImageMagick; I don't even know what it is! But you should bear in mind that if it's relocatable you'll want to check all the possible locations.

Take a look at NSSearchPathForDirectoriesInDomains() in the docs.

Keith
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >fileExistsAtPath with * to indicate random (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: [Moderator] iPhone discussion here.
  • Next by Date: Small variant of NSSearchField?
  • Previous by thread: Re: fileExistsAtPath with * to indicate random
  • Next by thread: CIImage (TIFFRepresentation) memory leak
  • Index(es):
    • Date
    • Thread