`C++` files from a package
cpp_files(pkg = ".")
A character vector of `C++` files found in the package, ordered according to the C locale, for stability across different sessions and platforms.
# Setup
pkg <- tempfile()
dir.create(file.path(pkg, "src"), recursive = TRUE)
file.create(file.path(pkg, "src", "code.c"))
#> [1] TRUE
file.create(file.path(pkg, "src", "code.cpp"))
#> [1] TRUE
# List the files, only the C++ file will be listed
cpp_files(pkg)
#> [1] "/tmp/RtmpqIO2xw/file391bc32d6cd08/src/code.cpp"
# Cleanup
unlink(pkg, recursive = TRUE)