dot-doubleExt: Return File-name Extensions Including Double Extensions (eg...

.doubleExtR Documentation

Return File-name Extensions Including Double Extensions (eg txt.gz)

Description

This function allows retreiving extensions to filenames similar to file_ext, but also alllows to retreive selected double-extensions (txt.gz). The leading dor will ne excluded similar to file_ext

Usage

.doubleExt(fiNa, termExt = c("gz", "zip"))

Arguments

fiNa

(character) name of file to be tested (may include path)

termExt

(character) additional terminal extensions

Details

The argument termExt allows specifying additional (terminal) extensions to be recognized.

Value

This function returns a character vector with file-extensions (excluding the leading dot). (Only purely alphanumeric extensions are recognized.)

See Also

file_ext, checkFilePath

Examples

fi <- c("ab","ab.c","ab.c.gz","ab.d","ab.d.zip","ab.e")
.doubleExt(fi)

wrMisc documentation built on April 3, 2025, 8:17 p.m.