Re: Is a unix path a child of a parent
Re: Is a unix path a child of a parent
- Subject: Re: Is a unix path a child of a parent
- From: Anton Altaparmakov <email@hidden>
- Date: Tue, 12 Mar 2013 08:58:15 +0000
Hi,
On 12 Mar 2013, at 07:28, tridiak <email@hidden> wrote:
> How do you determine if a unix path childPath has a parent parentPath? (Or the other way around).
> A simple string comparison seems too simplistic.
> What are the gotchas?
> (I'm used to using FSGetCatalogInfo() but I am moving away from the Carbon file manager.)
You could use realpath() and then compare the strings...
See: "man realpath" for details.
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden