]> gitweb.factorcode.org Git - factor.git/commit
io.pathnames: Add canonicalize-path.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Jul 2018 16:59:59 +0000 (11:59 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Jul 2018 16:59:59 +0000 (11:59 -0500)
commit3ac520a8ecb1af0849d4cc40c36b284b02bf40e9
tree1dc361ddad97b3fc1662dc9401e954981f0203aa
parentf4ac9fcfca0fc5a35b88aac930dec71840c15ee8
io.pathnames: Add canonicalize-path.

The idea is to make a canonical representation of any path, taking into
account . and .. and unicode-prefix on Windows.

The use case is in a shell you have a current-directory and you can do
crazy commands like ``cd ../foo/bar/baz/../.././././`` and get the
canonical/shortened directory name. You can also use this word to
compare if two paths are the same.
basis/io/files/windows/windows.factor
core/io/pathnames/pathnames-tests.factor
core/io/pathnames/pathnames.factor