Re: Normalizing a path containing a symlink

2013-11-16 Thread Rick Mann
On Nov 16, 2013, at 21:31 , Ken Thomases wrote: > On Nov 16, 2013, at 3:28 PM, Rick Mann wrote: > >> The thing I'm trying to accomplish is to iterate all the files in a subtree, >> and then compute the last few parts of the path from that top-level >> directory. >> >> I get the top-level dir

Re: Normalizing a path containing a symlink

2013-11-16 Thread Ken Thomases
On Nov 16, 2013, at 3:28 PM, Rick Mann wrote: > The thing I'm trying to accomplish is to iterate all the files in a subtree, > and then compute the last few parts of the path from that top-level directory. > > I get the top-level directory by asking for the documents directory, and it > gives m

Re: Normalizing a path containing a symlink

2013-11-16 Thread Rick Mann
The thing I'm trying to accomplish is to iterate all the files in a subtree, and then compute the last few parts of the path from that top-level directory. I get the top-level directory by asking for the documents directory, and it gives me "/var/.../Documents/" (to which I append "Foo"). I then

Re: Normalizing a path containing a symlink

2013-11-16 Thread Charles Srstka
On Nov 16, 2013, at 12:24 PM, Mike Abdullah wrote: > How about using -fileReferenceURL on everything? That won't give you a > normalized *path* as such, but should give you consistent URLs for > identifying individual files > > Mike. You could also use getResourceValue:forKey:error: on the UR

Re: Normalizing a path containing a symlink

2013-11-16 Thread Mike Abdullah
How about using -fileReferenceURL on everything? That won't give you a normalized *path* as such, but should give you consistent URLs for identifying individual files Mike. Sent from my iPhone > On 14 Nov 2013, at 03:27 am, Rick Mann wrote: > > In my iOS app, I create a directory in the user

Re: Normalizing a path containing a symlink

2013-11-13 Thread Maxthon Chan
Alternatively, syscall readlink(2) and some C hack may come to help. On Nov 14, 2013, at 11:27, Rick Mann wrote: > In my iOS app, I create a directory in the user’s Documents directory, and > then later iterate the contents of that directory. The problem is that on > iOS, that directory has a

Normalizing a path containing a symlink

2013-11-13 Thread Rick Mann
In my iOS app, I create a directory in the user’s Documents directory, and then later iterate the contents of that directory. The problem is that on iOS, that directory has a path like “/var/stuff/Documents/Dir”, and when I iterate it, the resulting contents have paths like “/private/var/stuff/D