[Python-Dev] realpath?

Ka-Ping Yee pingster@ilm.com
Thu, 20 Jul 2000 15:09:30 -0700 (PDT)

We have normpath() and readlink(), but how about realpath()?

Seems like a good thing to have in the posixmodule.

The man page for the C routine says:

     char *realpath (const char *file_name, char *resolved_name);

     realpath resolves all links, symbolic links, and references to ``.'' and
     ``..'' in file_name and stores it in resolved_name.

     It can handle both relative and absolute path names.  For absolute path
     names and the relative names whose resolved name cannot be expressed
     relatively (for example, ../../reldir), it returns the resolved absolute

     resolved_name should point to a buffer (MAXPATHLEN) bytes in length to
     contain the fully resolved path name.

-- ?!ng