It is a downloadFile module helper to return periscope2 defined file types list and warns user if an invalid type is included

downloadFile_ValidateTypes(types)

Arguments

types

list of types to test

Value

the list input given in types

Examples

  #inside console
  ## Check valid types
  result <- periscope2::downloadFile_AvailableTypes()
  identical(result, c("csv", "xlsx", "tsv", "txt", "png", "jpeg", "tiff", "bmp"))
#> [1] TRUE

  ## check invalid type
  testthat::expect_warning(downloadFile_ValidateTypes(types = "csv_invalid"),
                           "file download list contains an invalid type <csv_invalid>")