ft <- read.table(header=TRUE, stringsAsFactors=FALSE, text="
type filename
data daily_kl_recent_tageswerte_KL_03987_akt.zip
meta daily_kl_recent_KL_Tageswerte_Beschreibung_Stationen.txt
multia multi_annual_mean_81-10_Temperatur_1981-2010_aktStandort.txt
multia multi_annual_mean_81-10_Temperatur_1981-2010.txt
stand subdaily_standard_format_kl_10381_00_akt.txt
deriv derived_germany_soil_daily_historical_3987.txt.gz
pdf DESCRIPTION_obsgermany_climate_monthly_kl_historical_en.pdf
radar radolan_recent_bin_raa01-rw_10000-1802020250-dwd---bin.gz
binary daily_radolan_historical_bin_2017_SF201712.tar.gz
raster 16_DJF_grids_germany_seasonal_air_temp_mean_188216.asc.gz
nc daily_Project_TRY_humidity_RH_199509_daymean.nc.gz
asc radolan_historical_asc_2018_RW-201809.tar
rklim 5_minutes_radolan_reproc_2017_002_bin_2020_YW2017.002_202006.tar
grib2 ftp_weather_nwp_cosmo-d2_005_T_2M.grib2.bz2
")
fileType(ft$filename)
stopifnot(fileType(ft$filename)==ft$type)
berryFunctions::is.error(fileType("random_stuff.odt"), force=TRUE)
stopifnot(validFileTypes %in% ft$type)
stopifnot(ft$type %in% validFileTypes)
Run the code above in your browser using DataLab