getExtension {utilitiesR} | R Documentation |
get the extension of input path(s)
getExtension(paths, preserveCase = FALSE)
paths |
the path(s) to get the extension of |
preserveCase |
boolean, default FALSE. Whether or not to preserve the case of the extension. If FALSE, returns lowercase. |
the extension(s) of the path, being the text from the last '.' to the end. If no extension, returns ”.
Other file: createFilename
,
getFilename
,
getUniqueFilename
,
makeIfNotExists
getExtension('a/b/c.def') # 'def' getExtension('a/b') # '' (no extension) getExtension(c('a/b.png', 'c/d/e.jpg')) # "png" "jpg"