tests/testthat/_snaps/path.md

path / errors on paths which are too long

Code
  path(paste(rep("a", 1e+05), collapse = ""))
Condition
  Error in `path_tidy()`:
  ! Total path length must be less than PATH_MAX: <path-max>
Code
  do.call(path, as.list(rep("a", 1e+05)))
Condition
  Error in `path_tidy()`:
  ! Total path length must be less than PATH_MAX: <path-max>

path_rel / works for POSIX paths

Code
  path_rel(c("a", "a/b", "a/b/c"), c("a/b", "a"))
Condition
  Error:
  ! `start` must be a single path to a starting directory.


Try the fs package in your browser

Any scripts or data that you put into this service are public.

fs documentation built on March 24, 2026, 9:08 a.m.