chickadee » files » normalize-pathname

normalize-pathname PATHNAME #!optional PLATFORMprocedure

Performs a simple "normalization" on the PATHNAME, suitably for PLATFORM, which should be one of the symbols windows or unix and defaults to on whatever platform is currently in use. All relative path elements and duplicate separators are processed and removed. If NAME ends with a / or is empty, the appropriate slash is appended to the tail.

No directories or files are actually tested for existence; this procedure only canonicalises path syntax.