1#' Read the value of a symbolic link
2#'
3#' @return A tidy path to the object the link points to.
4#' @template fs
5#' @export
6#' @examples
7#' \dontshow{.old_wd <- setwd(tempdir())}
8#' file_create("foo")
9#' link_create(path_abs("foo"), "bar")
10#' link_path("bar")
11#'
12#' # Cleanup
13#' file_delete(c("foo", "bar"))
14#' \dontshow{setwd(.old_wd)}
15link_path <- function(path) {
16  assert_no_missing(path)
17
18  old <- path_expand(path)
19
20  path_tidy(.Call(fs_readlink_, old))
21}
22