fs
fs copied to clipboard
[Vignette] path_norm() doesn't approximate to normalizePath()
trafficstars
In the Comparison Vignette, path_norm() is said to approximate normalizePath().
It seems that path_norm() is more the equivalent of path_abs() though:
library(fs)
normalizePath(".")
#> [1] "/private/var/folders/5z/rm2h62lj45d332kfpj28c8zm0000gn/T/RtmpdjTe5h/reprex171265ac46d6f"
path_norm(".")
#> .
path_abs(".")
#> /private/var/folders/5z/rm2h62lj45d332kfpj28c8zm0000gn/T/RtmpdjTe5h/reprex171265ac46d6f
Created on 2019-11-27 by the reprex package (v0.3.0)
normalizePath() does many things, it is really more like the equivalent of path_expand() + path_abs() + path_norm().
But you are probably correct in general that of the three path_abs() is the closest to the most common uses of normalizePath().