Skip to contents

Does a File have a Zip Extension (.zip, .7z)?

Usage

has_zip_extension(file, expected = c("zip", "7z"))

Arguments

file

path(s) to file(s) to be checked for zip extension

expected

expected file name extensions. Default: c("zip", "7z")

Value

vector of logical

Examples

all(has_zip_extension(c("a.zip", "b.ZIP", "c.Zip", "d.7z", "e.7Z"))) # TRUE
#> [1] TRUE
has_zip_extension("a.txt") # FALSE
#> [1] FALSE