static/jsvm/functions/_filepath.clean.html
Clean returns the shortest path name equivalent to path by purely lexical processing. It applies the following rules iteratively until no further processing can be done:
along with the non-.. element that precedes it.Copy
that is, replace "/.." by "/" at the beginning of a path, assuming Separator is '/'.Copy
The returned path ends in a slash only if it represents a root directory, such as "/" on Unix or C:\ on Windows.
Finally, any occurrences of slash are replaced by Separator.
If the result of this process is an empty string, Clean returns the string ".".
On Windows, Clean does not modify the volume name other than to replace occurrences of "/" with ``. For example, Clean("//host/share/../x") returns \\host\share\x.
See also Rob Pike, “Lexical File Names in Plan 9 or Getting Dot-Dot Right,” https://9p.io/sys/doc/lexnames.html
OSLightDark
Generated using TypeDoc