Notebooks & Scripts

stubs_path

Get Path to Stub Templates Directory

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

Argument Description
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

Returns

Character path to stubs directory

Examples

# Get active stubs directory
stubs_path()

# Get framework stubs directory
stubs_path("framework")

# Get user stubs directory
stubs_path("user")

Source: R/stubs.R