R/fileExt.r

Defines functions .fileExt

#' File extension
#'
#' @description Returns the file extension. Borrowed from **tools** package.
#'
#' @param x Character.
#'
#' @returns Character.
#'
#' @aliases fileExt
#' @noRd
.fileExt <- function(x) {

	pos <- regexpr("\\.([[:alnum:]]+)$", x)
    ifelse(pos > -1L, substring(x, pos + 1L), "")

}
adamlilith/fasterRaster documentation built on Oct. 26, 2024, 4:06 p.m.