context_roots: Extract normalized contextual roots

View source: R/context_roots.R

context_rootsR Documentation

Extract normalized contextual roots

Description

Returns a normalized character vector of contextual roots from either:

Usage

context_roots(x)

Arguments

x

Character vector of contextual roots or a named list of contextual definitions.

Details

  • a character vector of contextual roots;

  • a named list of contextual definitions.

The function:

  • flattens contextual roots;

  • normalizes filesystem separators;

  • removes trailing separators;

  • validates uniqueness.

This is the public interface for obtaining contextual aggregation boundaries from context definitions.

Value

A normalized character vector of unique contextual roots.

Examples

mini_context <- list(
  packages = c(
    "D:/packages/examplepkg",
    "C:/packages/examplepkg"
  ),
  research = "D:/research/projectA"
)

context_roots(mini_context)


fscontext documentation built on Nov. 19, 2026, 5:11 p.m.