I was thinking that’d break sandbox encapsulation.  But I guess what really 
matters is what you get when you do the reverse and expand the tilde?

> 
> On Dec 11, 2022, at 17:58, Ben Kennedy via Cocoa-dev 
> <[email protected]> wrote:
> 
> 
> 
>> On 11 Dec 2022, at 12:51 pm, Mike Abdullah via Cocoa-dev 
>> <[email protected]> wrote:
>> 
>> Have you tried -URLByResolvingSymlinksInPath? As far as I’m aware, the 
>> Pictures entry inside your container is a symlink to the real thing, so 
>> assuming you have appropriate entitlements, should be possible to resolve it.
> 
> 
> Indeed, it seems to work in a Swift REPL. Issuing...
> 
> (URL(fileURLWithPath: 
> "/Users/ben/Library/Containers/com.apple.ScreenSaver.Engine/Data/Pictures").resolvingSymlinksInPath().path
>  as NSString).abbreviatingWithTildeInPath
> 
> ...yeilds "~/Pictures".
> 
> -ben
> 
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/admin.szatmari.net%40gmail.com
> 
> This email sent to [email protected]
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to