# WARNING - Generated by {fusen} from dev/flat_convert_r.Rmd: do not edit by hand

#' Create an excel mask compatible with the convert_r() function
#' @param output_path Character 1L. Folder path where the mask will be created
#' @param output_filename Character 1L. File name (with extension) of the mask
#' @return No return value, called for side effects. An Excel file
#'   (\code{.xlsx}) is written to \code{file.path(output_path, output_filename)}
#'   containing an empty template with columns \code{folder_path}, \code{file},
#'   \code{converted_file}, and \code{to_convert}.
#' @export
#'
#' @examples
#' mydir <- file.path(tempdir(), "convert_r_tests_examples")
#' dir.create(mydir)
#'
#' mask_convert_r(output_path = mydir)
#'
#' list.files(mydir)
#'
#' unlink(mydir, recursive = TRUE)
mask_convert_r <- function (output_path,
                            output_filename = "mask_convert_r.xlsx") {

  if (isFALSE(dir.exists(output_path))) {
    
    stop("output_path doesn't exist")
  }
  
  mask <- data.frame(folder_path = NA,
                     file = NA,
                     converted_file = NA,
                     to_convert = NA)

  writexl::write_xlsx(mask,
                      path = file.path(output_path,
                                       output_filename))
}
