.old_wd <- setwd(tempdir())
dir_ls(R.home("share"), type = "directory")
# Create a shorter link
link_create(system.file(package = "base"), "base")
dir_ls("base", recurse = TRUE, glob = "*.R")
# If you need the full paths input an absolute path
dir_ls(path_abs("base"))
dir_map("base", identity)
dir_walk("base", str)
dir_info("base")
# Cleanup
link_delete("base")
setwd(.old_wd)
Run the code above in your browser using DataLab