Re: How to show a file in Finder
Re: How to show a file in Finder
- Subject: Re: How to show a file in Finder
- From: email@hidden
- Date: Mon, 31 Oct 2016 19:15:33 +0900
See these in NSWorkspace
activateFileViewerSelectingURLs:
Activates the Finder, and opens one or more windows selecting the specified files.
-selectFile:inFileViewerRootedAtPath:
Selects the file specified by fullPath.
Sent from my iPhone
> On 31 Oct 2016, at 19:00, Gerriet M. Denkmann <email@hidden> wrote:
>
>
> I want to show a file in Finder (not open it in some application).
>
> I tried:
> NSString *path = @“/some/thing.plist”;
> [ sharedWorkspace openFile: path withApplication: @“Finder.app" ]
> but this opens Xcode and displays the content of path.
>
> I just want a Finder window with my path selected.
> How can this be done?
>
> (Preferably without using AppleScript).
>
> macOS 12.1
>
> Gerriet.
>
>
> _______________________________________________
>
> 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
_______________________________________________
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