std::fs::canonicalize does most of the work, but it doesn't expand ~. std::env::home_dir is deprecated. So I added the dirs dependency, which is relatively light and only has one dependency.
Features:
. and .. are resolved
~ is resolved to the current users home directory (should work on all major OSs; see the documentation for dirs::home_dir)
symbolic links are resolved (see std::fs::canonicalize)
Limitations:
expansion of other users home directories is not supported (~user/)
expansion only works for files which exist on the filesystem (see std::fs::canonicalize)
std::fs::canonicalize
does most of the work, but it doesn't expand~
.std::env::home_dir
is deprecated. So I added thedirs
dependency, which is relatively light and only has one dependency.Features:
.
and..
are resolved~
is resolved to the current users home directory (should work on all major OSs; see the documentation fordirs::home_dir
)std::fs::canonicalize
)Limitations:
std::fs::canonicalize
)Closes #87