downloadFile_ValidateTypes {periscope2}R Documentation

Check passed file types against downloadFile module allowed file types list

Description

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

Usage

downloadFile_ValidateTypes(types)

Arguments

types

list of types to test

Value

the list input given in types

See Also

downloadFileButton

downloadFile

logViewerOutput

downloadablePlot

downloadableTableUI

downloadableTable

Examples

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

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



[Package periscope2 version 0.2.3 Index]