• 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: Is a unix path a child of a parent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Is a unix path a child of a parent (From: tridiak <email@hidden>)

  • Prev by Date: Re: Is a unix path a child of a parent
  • Next by Date: Re: Is a unix path a child of a parent
  • Previous by thread: Re: Is a unix path a child of a parent
  • Next by thread: Re: Is a unix path a child of a parent
  • Index(es):
    • Date
    • Thread