R/personfiles_path.R

Defines functions personfiles_path

Documented in personfiles_path

#' Build the saving path for a folder.
#' @description
#' This function builds the saving path for a folder via
#' \code{folder_dir}/\code{folder_name}.\code{file_extension}.
#' @inheritParams folder
#' @param folder_name
#' The name for the folder.
#' @param file_extension
#' The file extension for the folder.
#' @return
#' The saving path for a folder.
#' @examples
#' ### Create the standard saving path.
#' personfiles_path()

personfiles_path <- function(folder_dir = ".", folder_name = "personfiles",
                             file_extension = "rds"){
  stopifnot(is.character(folder_dir))
  stopifnot(is.character(folder_name))
  stopifnot(file_extension == "rds")
  path <- paste0(folder_dir,"/",folder_name,".",file_extension)
  return(path)
}
loelschlaeger/personfiles documentation built on Dec. 21, 2021, 11:45 a.m.