View source: R/construct_structural_paths.R
| construct_structural_paths | R Documentation |
Construct normalized context-relative structural paths from filesystem snapshot observations.
construct_structural_paths(snapshot, contexts)
snapshot |
A filesystem snapshot tibble containing at least:
|
contexts |
A contextual reconstruction object containing contextual roots. |
The function creates an intermediate structural abstraction layer between:
observational filesystem paths;
contextual semantic interpretation.
Observations are:
matched to contextual roots;
normalized into context-relative structural paths;
recursively expanded into hierarchical structural components.
This enables:
contextual filesystem diagnostics;
recursive structural matching;
contextual coverage analysis;
semantic refinement workflows.
For example:
"R/import/helpers.R"
expands into:
"R"
"R/import"
"tests/testthat/test-import.R"
expands into:
"tests"
"tests/testthat"
The function explicitly separates:
rel_pathStorage-relative observational filesystem path.
structural_pathContext-relative normalized structural path.
explored_pathRecursively expanded structural abstraction layer.
A tibble containing recursively expanded contextual structural paths.
The returned tibble includes:
Contextual ecosystem identifier.
Matched contextual root.
Original storage-relative observational path.
Context-relative normalized structural path.
Recursively expanded structural abstraction.
data("fscontextdemo_snapshot_02")
mini_context <- list(
alpha = "D:/_packages/fscontextdemo"
)
mini_snapshot <- fscontextdemo_snapshot_02[
c(1, 3, 5, 10),
]
structural_paths <- construct_structural_paths(
snapshot = mini_snapshot,
contexts = mini_context
)
structural_paths[, c("context", "structural_path", "explored_path")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.