Resolve all symbolic links and all components (tilde, ., .., …+) and return the path in its absolute form.

Resolve only path components (tilde, ., .., …+), if possible.

Expand tilde (“~”) into a home directory if it is the first path component

Resolve to a path that is accepted by the system and no further - tilde is expanded, and ndot path components are expanded.

Trim trailing path separator from a string