Skip to contents

Finds a .insider/ directory by walking upward from dir, or creates one at dir when create = TRUE. The store is designed for explicit, single-user curation; concurrent writers are not coordinated.

Usage

insider_store(dir = ".", create = FALSE)

Arguments

dir

A starting directory to search from, or the directory where a new .insider/ store should be created.

create

Whether to create a new .insider/ store at dir when none is found while walking upward.

Value

An insider_store handle with absolute root and project paths.

Examples

proj <- tempfile("proj-")
dir.create(proj)
store <- insider_store(proj, create = TRUE)
store
#> 
#> ── insideR store ───────────────────────────────────────────────────────────────
#> Store root: /tmp/Rtmpvw2GbA/proj-180e622ff3a4/.insider
#> Project root: /tmp/Rtmpvw2GbA/proj-180e622ff3a4
#> Entries: 0
#> Kinds: none