Checks the existence of elements inside a GTFS object that represent specific GTFS text files.
check_file_exists(x, files)
assert_file_exists(x, files)
check_file_exists
returns TRUE
if the check is successful, and
FALSE
otherwise. assert_file_exists
returns x
invisibly if the check is
successful, and throws an error otherwise.
Other checking functions:
check_field_class()
,
check_field_exists()
gtfs_path <- system.file("extdata/ggl_gtfs.zip", package = "gtfsio")
gtfs <- import_gtfs(gtfs_path)
check_file_exists(gtfs, c("calendar", "agency"))
#> [1] TRUE
check_file_exists(gtfs, c("calendar", "oi"))
#> [1] FALSE