Debian Codegraph @

man/cpp_files.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/decor.R
3 \name{cpp_files}
4 \alias{cpp_files}
5 \title{`C++` files from a package}
6 \usage{
7 cpp_files(pkg = ".")
8 }
9 \arguments{
10 \item{pkg}{The path to a package's root directory.}
11 }
12 \value{
13 A character vector of `C++` files found in the package, ordered
14 according to the C locale, for stability across different sessions and
15 platforms.
16 }
17 \description{
18 `C++` files from a package
19 }
20 \examples{
21 # Setup
22 pkg <- tempfile()
23 dir.create(file.path(pkg, "src"), recursive = TRUE)
24 file.create(file.path(pkg, "src", "code.c"))
25 file.create(file.path(pkg, "src", "code.cpp"))
26
27 # List the files, only the C++ file will be listed
28 cpp_files(pkg)
29
30 # Cleanup
31 unlink(pkg, recursive = TRUE)
32 }