import { fn } from "https://deno.land/x/ddu_vim@v4.0.0/deps.ts";
const { simplify } = fn;
Simplify the file name as much as possible without changing the meaning. Shortcuts (on MS-Windows) or symbolic links (on Unix) are not resolved. If the first path component in {filename} designates the current directory, this will be valid for the result as well. A trailing path separator is not removed either. On Unix "//path" is unchanged, but "///path" is simplified to "/path" (this follows the Posix standard). Example:
simplify("./dir/.././/file/") == "./file/"
Note: The combination "dir/.." is only removed if "dir" is
a searchable directory or does not exist. On Unix, it is also
removed when "dir" is a symbolic link within the same
directory. In order to resolve all the involved symbolic
links before simplifying the path name, use resolve()
.
Can also be used as a method
:
GetName()->simplify()