stubs_path: Get Path to Stub Templates Directory

View source: R/stubs.R

stubs_pathR Documentation

Get Path to Stub Templates Directory

Description

Returns the path to the user's stubs directory, or the framework stubs directory if no user stubs exist.

Usage

stubs_path(which = "auto")

Arguments

which

Character. Which directory to return:

  • "user" - User's project stubs directory (stubs/)

  • "framework" - Framework's built-in stubs directory

  • "auto" (default) - User directory if it exists, otherwise framework

Value

Character path to stubs directory

Examples


if (FALSE) {
# Get active stubs directory
stubs_path()

# Get framework stubs directory
stubs_path("framework")

# Get user stubs directory
stubs_path("user")
}



framework documentation built on Feb. 18, 2026, 1:07 a.m.