The goal of pkgfiles is to enumerate and classify all files in an R package project. This is mostly useful for other packages that iterate over all files of a specific kind in an R package.

Installation

Once released, you can install the released version of pkgfiles from CRAN with:

install.packages("pkgfiles")

For now, install from GitHub with

Example

The pf_get() function enumerates and classifies all files in the current project.

Under the hood, the returned object is a tibble that contains the return from a fs::dir_info() call augmented by a class column:

The classification is based on regular expressions for the project-relative path of the files. This list is extensible but the existing entries should rarely change.