.doubleExt {wrMisc} | R 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
Examples
fi <- c("ab","ab.c","ab.c.gz","ab.d","ab.d.zip","ab.e")
.doubleExt(fi)
[Package wrMisc version 1.15.4 Index]