> On 11 Dec 2022, at 12:51 pm, Mike Abdullah via Cocoa-dev 
> <cocoa-dev@lists.apple.com> 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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to