tests/testthat/_snaps/path_select.md

vectorized

Code
  path_select_components(path, 1:3)
Output
  some/simple/path another/path/to  
Code
  path_select_components(path, 1:3, "end")
Output
  to/a/file.txt     path/to/file2.txt 
Code
  path_select_components(path, integer())
Output

Code
  unclass(path_select_components(path, integer()))
Output
  [1] "" ""
Code
  path_select_components(fs_path(character()), 1:3)
Output
  character(0)
Code
  path_select_components(fs_path(character()), 1:3, "end")
Output
  character(0)
Code
  class(path_select_components(fs_path(character()), 1:3))
Output
  [1] "fs_path"   "character"
Code
  class(path_select_components(fs_path(character()), 1:3, "end"))
Output
  [1] "fs_path"   "character"


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.