OS-Path normalization. Used by os.nim but also generally useful for dealing with paths.
Unstable API.
proc normalizePath(path: string; dirSep = DirSep): string {....raises: [],
tags: [], forbids: [].}Example:
when defined(posix):
doAssert normalizePath("./foo//bar/../baz") == "foo/baz"
'/foo/../bar' to '/bar'.'./' from the path, but "foo/.." becomes ".".
© 2006–2024 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/pathnorm.html