Re: How to distinguish if a file is a Document or an Application
Re: How to distinguish if a file is a Document or an Application
- Subject: Re: How to distinguish if a file is a Document or an Application
- From: Alex <email@hidden>
- Date: Wed, 19 Mar 2003 11:21:08 -0800
From the Cocoa reference on NSFileManager:
isExecutableFileAtPath:
- (BOOL)isExecutableFileAtPath:(NSString *)path
Returns YES if the underlying operating system appears able to execute
the file specified in path and NO if it cannot. This method traverses
symbolic links.
==
so, you should be able to do this then....
BOOL isExecutableOrNot = [[NSFileManager defaultManager]
isExecutableFileAtPath:@"/Volumes/somevolume/myapp.app"];
=
On Wednesday, March 19, 2003, at 10:50 AM, John MacDonnell wrote:
>
From: John MacDonnell <email@hidden>
>
Date: Wed Mar 19, 2003 10:50:18 AM US/Pacific
>
To: email@hidden
>
Subject: How to distinguish if a file is a Document or an Application
>
>
Hello gurus,
>
I'd like to understand from a given path if the file addressed by the
>
path is a Document or an Application.
>
>
can you help me in that? the problem is than in Mac OS X applications
>
are directories (bundle) but they might be single file too if they are
>
carbon ones. how to distinguish Apps from directories..
>
>
thanks and see you on WWDC!
>
>
Giovanni
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.