examples/dirpath_get.R

library(outsider.base)
# get the parent directory from a filepath
drpth <- tempdir()
flpth <- file.path(drpth, 'testfile')
file.create(flpth)
(dirpath_get(flpth = flpth) == drpth)
(dirpath_get(flpth = drpth) == drpth)
file.remove(flpth)
ropensci/outsider.base documentation built on June 21, 2022, 7:39 p.m.