The Path class / os.Path methods |
Returns the canonical equivalent of a path.
The os.path.fullpath() class method takes a path as parameter and resolves extra path separator characters (/ on UNIX™, \ on Windows™), as well as references to current (.) and parent directory (..). The result is called a canonical path.
On UNIX, symbolic links are not followed. Use the os.Path.islink() method to identify symbolic links.
DISPLAY os.Path.fullpath("/home/usr//scott/tmp/../images")
Resolves to:
/home/usr/scott/images