Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Adam P Jenkins
On Mar 10, 2008, at 3:03 PM, Jeff LaMarche wrote: On Mar 10, 2008, at 2:54 PM, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. ImageMagick has some X11 components, but can be compiled as a set of unix command line p

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Keith Duncan
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 defaultManage

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread glenn andreas
On Mar 10, 2008, at 2:03 PM, Jeff LaMarche wrote: On Mar 10, 2008, at 2:54 PM, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. ImageMagick has some X11 components, but can be compiled as a set of unix command line

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Mr. Gecko
Randall Meadows Helped me and I came up with NSFileManager *fm = [NSFileManager defaultManager]; int i; NSArray *folders = [fm directoryContentsAtPath:@"/"]; for (i=0;i<[folders count];i++) { NSString *folder = [folders objectAtIndex:i]; if ([folder hasPrefix:@"ImageMagick"]) { ImageMa

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Herb Petschauer
With a datapoint of one X11 application (Wireshark.app) If I double click on a pcap file, LS does actually launch X11 and runs Wireshark(although the file doesn't actually get opened by Wireshark but that is a different conversation). mdfind "kMDItemKind == 'Application'" also finds Wireshark.

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Thomas Engelmeier
On 10.03.2008, at 19:54, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. command-line ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Jeff LaMarche
On Mar 10, 2008, at 2:54 PM, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. ImageMagick has some X11 components, but can be compiled as a set of unix command line programs that will perform various operations on im

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread John Stiles
In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. Brian Stern wrote: On Mar 10, 2008, at 12:10 PM, Mr. Gecko wrote: I'm needing my application to find out if ImageMagick is installed. You should look at Launch Services. This Carbon API w

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Brian Stern
On Mar 10, 2008, at 12:10 PM, Mr. Gecko wrote: I'm needing my application to find out if ImageMagick is installed. You should look at Launch Services. This Carbon API will tell you the application that will open for a given document or kind of document. "The Launch Services function LSFi

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Brady Duga
On Mar 10, 2008, at 9:10 AM, Mr. Gecko wrote: I'm needing my application to find out if ImageMagick is installed. It is usually installed in the root directory(/) and it has the name of ImageMagick-6.3.8. As previously pointed out, that is probably a bad assumption to make. I want it to d

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Kyle Sluder
On Mon, Mar 10, 2008 at 12:10 PM, Mr. Gecko <[EMAIL PROTECTED]> wrote: > But it does not seem to know * as a random indicator like PHP and > Terminal does. I can't seem to think of a way to do this so, if any > one can help me figure this out I would be very grateful. It's not "random", it's ca

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Randall Meadows
On Mar 10, 2008, at 10:10 AM, Mr. Gecko wrote: Hello, I'm new to cocoa so any help will be appreciated. I'm needing my application to find out if ImageMagick is installed. It is usually installed in the root directory(/) and it has the name of ImageMagick-6.3.8. I want it to detect it eve

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread John Stiles
You could use -directoryContentsAtPath: and check the array yourself for matches. Mr. Gecko wrote: Hello, I'm new to cocoa so any help will be appreciated. I'm needing my application to find out if ImageMagick is installed. It is usually installed in the root directory(/) and it has the nam

fileExistsAtPath with * to indicate random

2008-03-10 Thread Mr. Gecko
Hello, I'm new to cocoa so any help will be appreciated. I'm needing my application to find out if ImageMagick is installed. It is usually installed in the root directory(/) and it has the name of ImageMagick-6.3.8. I want it to detect it even if the version is 6.3.9. That way if there a