Library Function li_lexpath

function sLex = li_lexpath(sPath)

Lexically normalises an absolute or relative path passed in row vector of char <sPath> and returns the result as row vector of char in <sLex>.

All dot directories ('.') will be removed. All dot-dot directories ('..') will be resolved where possible. Any successsion of file separators will be replaced by a single system file separator.

If not all dot-dot directories ('..') of an absolute path could be resolved, all remaining dot-dot directories ('..') will follow the root directory and no error will be thrown. Thus paths like 'C:\..\..' or '/../../..' might be returned, if unresolvable dot-dot directories appear in an absolute input path <sPath>.