Check if files are .gt3x files

Check if a .gt3x file or unzipped gt3x directory has both log.bin and info.txt

is_gt3x(path)

have_log_and_info(path, verbose = TRUE)

Arguments

path

Path(s) to file(s)

verbose

print diagnostic messages

Value

Logical vector of the same length as path, which is TRUE if the corresponding path is a .gt3x file.

Details

Checks if files have a .gt3x file extension

See also

Other file manipulations: gt3x_datapath(), list_gt3x(), unzip.gt3x()

Other gt3x-utils: get_n_samples(), ticks2datetime()

Examples

is_gt3x("test.gt3x") # TRUE
#> test.gt3x #> TRUE
is_gt3x("test") # FALSE
#> test #> FALSE
is_gt3x(NULL)
#> [1] FALSE
have_log_and_info(tempfile(), verbose = TRUE)
#> /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmpRl6pes/file85a411d5ecad doesn't contain log.bin
#> /var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmpRl6pes/file85a411d5ecad doesn't contain info.txt
#> [1] FALSE