assert_safe_to_overwrite: Refuse to overwrite a protected directory

View source: R/utils.R

assert_safe_to_overwriteR Documentation

Refuse to overwrite a protected directory

Description

Aborts with an informative error when dir resolves to a well-known system path (~, /, R.home()) or a path whose absolute form is three characters or fewer (covers drive roots such as ⁠C:\⁠ on Windows).

Usage

assert_safe_to_overwrite(dir)

Arguments

dir

Character string. Path to check.

Value

Invisible TRUE when the path is safe.


shinyelectron documentation built on Dec. 3, 2026, 9:07 a.m.