Re: Sending a list of path strings to the Finder via Scripting Bridge
Re: Sending a list of path strings to the Finder via Scripting Bridge
- Subject: Re: Sending a list of path strings to the Finder via Scripting Bridge
- From: Charles Srstka <email@hidden>
- Date: Fri, 25 May 2012 02:34:12 -0500
On May 25, 2012, at 2:24 AM, Shane Stanley wrote:
> On 25/05/2012, at 4:56 PM, Peter wrote:
>
>> If all fails I'll have to convert the path strings to hfs paths and string-assemble a script to run using NSAppleScript in code
>
> If you do end up using NSAppleScript, you can still avoid HFS paths: just use 'POSIX file "/Users/fred/whatever.txt"'.
While this is probably the best way to go, for completeness’s sake, I should point out that if you do need to create an HFS-style path for some reason, you don’t have to do it by hand; you can use CFURLCopyFileSystemPath with kCFURLHFSPathStyle to generate an HFS path automatically.
Charles
_______________________________________________
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