• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to ResolvingSymlinksInPath ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to ResolvingSymlinksInPath ?


  • Subject: Re: How to ResolvingSymlinksInPath ?
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 04 Nov 2016 11:45:03 +0700

> On 4 Nov 2016, at 10:39, Ken Thomases <email@hidden> wrote:
>
> On Nov 3, 2016, at 10:08 PM, Gerriet M. Denkmann <email@hidden> wrote:
>>
>> URLByResolvingAliasFileAtURL does almost the same, has no special behaviour with “/private”, and even can resolve an alias.
>> But: only when this alias is the final component of a path.
>> I.e. /path/aliasToFoo will be resolved to /path/foo; but  /path/aliasToFoo/someFile will not.
>
> Paths "through" alias files make no sense.  Nothing else in the system will resolve an alias there, so nothing will ever produce such a path.

I typed in some OpenPanel: “/tmp/a1 alias/a2/aFile” and “/private/tmp/a1/a2/aFile” was opened without any problems.
But this may well be the only place where this works.

My app just needs the same functionality.


> If your code is producing such paths, you should fix it, because nothing else will be able to process them.
No, it does not. It just wants to read files.


> You should construct NSURL objects from the two paths, use -getResourceValue:forKey:error: with the key NSURLFileResourceIdentifierKey to get the resource ID for each, and then use [resourceID1 isEqual:resourceID2] to determine if the two paths refer to the same file-system object.

What I need is:
	goodPath = [ pathFromFSEventStream hasPrefix: somePath ]

pathFromFSEventStream might no longer exist (FSEventStream notifying me of it’s demise). I would still consider it a “ goodPath” if it has the right prefix.

Even if it does exist, I would need something like:
	[ fileResourceIdentifierFromFSEventStream isEqualOrDescendentOf: someFileResourceIdentifier ].

This might become rather more involved than a simple hasPrefix.


Kind regards,

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


References: 
 >How to ResolvingSymlinksInPath ? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to ResolvingSymlinksInPath ? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to ResolvingSymlinksInPath ? (From: Jens Alfke <email@hidden>)
 >Re: How to ResolvingSymlinksInPath ? (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to ResolvingSymlinksInPath ? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: How to ResolvingSymlinksInPath ?
  • Next by Date: Re: How to ResolvingSymlinksInPath ?
  • Previous by thread: Re: How to ResolvingSymlinksInPath ?
  • Next by thread: Re: How to ResolvingSymlinksInPath ?
  • Index(es):
    • Date
    • Thread