Conversation
| -- and remove as many indirections from it as possible. | ||
|
|
||
| realPath :: FilePath -> IO FilePath | ||
| realPath = canonicalizePath |
There was a problem hiding this comment.
This is not the same. Did you test and compare the realpath coreutil and this?
There was a problem hiding this comment.
yes:
*Streamly.Coreutils.RealPath> realPath "./test2.txt"
"/home/ranjeetr/composewell/CoreUtils/streamly-coreutils/test2.txt"
*Streamly.Coreutils.RealPath> realPath "../test2.txt"
"/home/ranjeetr/composewell/CoreUtils/test2.txt"
*Streamly.Coreutils.RealPath>
kaveri:/composewell/CoreUtils/streamly-coreutils (monadic-predicates)$ (nix) realpath ./test2.txt/composewell/CoreUtils/streamly-coreutils (monadic-predicates)$ (nix) realpath ../test2.txt
/home/ranjeetr/composewell/CoreUtils/streamly-coreutils/test2.txt
kaveri:
/home/ranjeetr/composewell/CoreUtils/test2.txt
kaveri:~/composewell/CoreUtils/streamly-coreutils (RealPath_module)$ (nix)
There was a problem hiding this comment.
same behaviors for symlink and nonexistent files.
*Streamly.Coreutils.RealPath> realPath "./ls.txt"
"/home/ranjeetr/composewell/CoreUtils/streamly-coreutils/test2.txt"
*Streamly.Coreutils.RealPath> realPath "../lsssss.txt"
"/home/ranjeetr/composewell/CoreUtils/lsssss.txt
e062159 to
6812cbb
Compare
|
Try testing on a symlink and on non-existing files. |
No description provided.