Skip to contents

Where this project's layout says layer lives. Under the split layout that is the layer's own file, named by the spec's fn_layer_file; under the monolith layout every layer resolves to the same file.

Usage

rfp_layout_layer_path(spec, layer)

Arguments

spec

A layout spec from rfp_layout().

layer

Character. Layer name.

Value

The path, which may not exist.

Details

A mapping, not a lookup - the path comes back whether or not anything is there, which is what a writer needs. Use rfp_layout_layers() to ask what actually exists.

Examples

project <- file.path(tempdir(), "layout_path_example")
dir.create(project)

split <- rfp_layout(project, layout = "split")
rfp_layout_layer_path(split, "bcfishpass.streams_vw")
#> /tmp/RtmpfSNDuG/layout_path_example/background_layers/bcfishpass.streams_vw.gpkg

monolith <- rfp_layout(project, layout = "monolith")
rfp_layout_layer_path(monolith, "bcfishpass.streams_vw")
#> /tmp/RtmpfSNDuG/layout_path_example/background_layers.gpkg

unlink(project, recursive = TRUE)