canonicalize function

String canonicalize (String path)

Canonicalizes path.

This is guaranteed to return the same path for two different input paths if and only if both input paths point to the same location. Unlike normalize, it returns absolute paths when possible and canonicalizes ASCII case on Windows.

Note that this does not resolve symlinks.

If you want a map that uses path keys, it's probably more efficient to pass equals and hash to new HashMap than it is to canonicalize every key.

Implementation

String canonicalize(String path) => context.canonicalize(path);