decor (version 1.0.0)

cpp_files: C++ files from a package

Description

C++ files from a package

Usage

cpp_files(pkg = ".")

Arguments

pkg

The path to a package's root directory.

Value

A character vector of C++ files found in the package.

Examples

Run this code
# NOT RUN {
# Setup
pkg <- tempfile()
dir.create(file.path(pkg, "src"), recursive = TRUE)
file.create(file.path(pkg, "src", "code.c"))
file.create(file.path(pkg, "src", "code.cpp"))

# List the files, only the C++ file will be listed
cpp_files(pkg)

# Cleanup
unlink(pkg, recursive = TRUE)
# }

Run the code above in your browser using DataLab