When using dir(), you can set full.names = FALSE, but then you can only pass a character vector of length one as path to not loose the information about where the files are. This function solves that case. It's needed when one wants to standardize paths to use set operations on them, i.e. when the user supplied input does not have a dot prefix. See 'Examples'.

dir_without_.(path, ...)

Arguments

path

A path.

...

Passed to base::dir().

See also

set_and_assert_arg_paths

Examples

setdiff("./file.R", "file.R") # you want to standardize first.
#> [1] "./file.R"