Makes path from file_name using directory to extention mappings specified in dir_map

get_path(
  file_names,
  dir_map = get_dir_map(),
  dir_only = FALSE,
  dir_terminate_with_sep = TRUE,
  make_dir = TRUE
)

Arguments

file_names

File names. Could also be a paths but only file's base name will be used

dir_map

A specification of mapping between file extention and directory. Can be a named list where names used as directory names and values if it is character are corresponding extentions that should go to the directory name or if it is list futher mappings of extentions to subdirectories in recursive manner

dir_only

return dir path only

dir_terminate_with_sep

if only dir path is returned whether to therminate it with dir separator (e.g. if it set then 'path/to/dor/' note separator '/' at the end)

make_dir

Whether to create dir recursively if it does not exists

Value

A path as a string