In unistd.h, I have the C function readlink, which follows a link down one target. The coreutil readlink has the great -f option to follow every sym link recursively. How can I get this behavior in C++? A boost library, a posix function I don't know about, etc?
** Edit ** was just looking at the man page for realpath. Is this giving the same 'canonical' expansion of readlink -f?
Yes,
realpathis the equivalent ofreadlink -f.See the man page for more information