# two files in this package
fs = system.file("scripts", c("call-fun.R", "child-pids.sh"), package = "xfun")
xfun::read_all(fs)
# add file paths before file content and an empty line after content
xfun::read_all(fs, before = function(f) paste("#-----", f, "-----"), after = "")
# add constants
xfun::read_all(fs, before = "/*", after = c("*/", ""))
Run the code above in your browser using DataLab