cpp_files: C++ files from a package

Description Usage Arguments Value Examples

View source: R/decor.R

Description

C++ files from a package

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

romainfrancois/decor documentation built on Dec. 14, 2021, 6:36 a.m.