Re: Opening a folder in the finder
Re: Opening a folder in the finder
- Subject: Re: Opening a folder in the finder
- From: Douglas Davidson <email@hidden>
- Date: Tue, 16 Apr 2002 11:01:58 -0700
Since /usr/bin/open is just a command-line wrapper around some of the
NSWorkspace functionality, I hope nobody invokes it for something like
this.
Now, /usr/bin/open uses openFile: or openFile:withApplication:, and does
happen to be the case that calling this on an ordinary folder (i.e., not
a package) will open it in the Finder. However, there is a more
specific call if you know that this is what you want, and that is
selectFile:inFileViewerRootedAtPath:. The semantics of "rooted at path"
may not be exactly what they were when this method was originally
designed, but you should be able to get it to do what you want; you can
pass nil for one or the other argument depending on your purposes.
Douglas Davidson
On Monday, April 15, 2002, at 05:33 PM, Charles Srstka wrote:
Maybe NSWorkspace can do what you want?
If not, I suppose fork/exec'ing the 'open' command would work...
On Monday, April 15, 2002, at 07:10 PM, Ben Mackin wrote:
I am hoping this to be pretty simple. I am using Objective-C, and am
wondering if there is a simple call where I specify a path, and the
folder
will be opened in the finder.
I have looked through a few of the Apple pages, but couldn't find
anything
(I am probably just looking in the wrong places...)
I appreciate the help,
Ben
_______________________________________________
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.
_______________________________________________
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.