This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
fullpath in addition to realpath
- From: "Eyal Amir" <eyalamir at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 14 Feb 2007 19:40:35 -0800
- Subject: fullpath in addition to realpath
It would be useful to have a function in glibc with identical
functionality to the win32 _fullpath function. That is, it should
append the current working directory to the relative path. Then
remove every "." from the path and go up a level in the path for every
"..". It should NOT resolve symbolic links.
I haven't tested realpath enough to know (since it doesn't serve my
purposes) whether it resolves all ".." and "." or whether it just
resolves those that are at the beginning of the relative path. It
would be useful if it resolved all so that you could specify a
relative path like "../here/there/../basename.txt" to represent
"../here/basename.txt". Same goes for "fullpath" if it is
implemented.
I need such a function (that doesn't resolve symbolic links) because
we never change our symbolic links but do sometimes change our
underlying directory structure.
Thanks,
Eyal