Relative paths [was: Path transformation]

mal content artifact.one at googlemail.com
Mon Aug 21 15:05:35 UTC 2006


Thanks to all who helped point me towards realpath().

I have another favour to ask: Is there a function that can
take two absolute paths and generate a relative path, from
source to destination?

/usr/bin/false  /bin

Becomes:

../../bin

/bin /usr/bin/false

Becomes:

../usr/bin/false

thanks,
MC


More information about the freebsd-hackers mailing list