• 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: How to distinguish if a file is a Document or an Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: How to distinguish if a file is a Document or an Application
      • From: David Remahl <email@hidden>
References: 
 >How to distinguish if a file is a Document or an Application (From: John MacDonnell <email@hidden>)

  • Prev by Date: Re: Window Sheet
  • Next by Date: Filenames for Apple Script
  • Previous by thread: How to distinguish if a file is a Document or an Application
  • Next by thread: Re: How to distinguish if a file is a Document or an Application
  • Index(es):
    • Date
    • Thread