Attempts to connect to the specified file-based engine. Returns FALSE if the file is not available or not properly formatted.
file_engine_check(filename, warn = TRUE)
TRUE if the database is available and properly formatted, FALSE otherwise.
print(file_engine_check("https://kghub.io/kg-obo/sepio/2023-06-13/sepio_kgx_tsv.tar.gz"))
#> [1] TRUE
print(file_engine_check("https://no-such-host.kghub.io/sepio_kgx_tsv.tar.gz"))
#> Warning: URL 'https://no-such-host.kghub.io/sepio_kgx_tsv.tar.gz': status was 'Couldn't resolve host name'
#> [1] FALSE
print(file_engine_check(system.file("extdata", "mondo_kgx_tsv.tar.gz", package = "monarchr")))
#> Warning: File does not exist.
#> [1] FALSE
print(file_engine_check(system.file("extdata", "nosuch_kgx_tsv.tar.gz", package = "monarchr")))
#> Warning: File does not exist.
#> [1] FALSE