Re: fileExistsAtPath with * to indicate random
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