check-vector-isCompressedFile: Does the input contain a compressed file?

check-vector-isCompressedFileR Documentation

Does the input contain a compressed file?

Description

Does the input contain a compressed file?

Usage

isCompressedFile(x)

isACompressedFile(x, nullOk = FALSE)

allAreCompressedFiles(x)

Arguments

x

Object.

nullOk

logical(1). If set to TRUE, x may also be NULL.

Details

Currently only performs a simple check, based on file extension match.

Value

TRUE on success; FALSE on failure, with cause set.

Functions

  • isCompressedFile(): Vectorized.

  • isACompressedFile(): Scalar.

  • allAreCompressedFiles(): Scalar.

Note

Updated 2023-09-29.

See Also

  • isFile().

  • compressFileExt.

Examples

## TRUE ====
x <- c("sample1.fastq.gz", "sample2.fastq.bz2")
invisible(file.create(x))
isCompressedFile(x)
unlink(x)

## FALSE ====
x <- c("sample1.fastq", "sample2.fastq")
invisible(file.create(x))
isCompressedFile(x)
unlink(x)

acidgenomics/goalie documentation built on Dec. 11, 2023, 11:36 p.m.