1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/files.R
\name{file_extension}
\alias{file_extension}
\title{Extract File Extension}
\usage{
file_extension(x, ext = NULL)
}
\arguments{
\item{x}{path as a character vector.}
\item{ext}{extension to append instead of the original extension.}
}
\value{
a character vector.
}
\description{
Extract File Extension
}
\examples{
file_extension('alpha.txt')
file_extension(paste('aa.tt', 1:5, sep=''))
# change extension
file_extension(paste('aa.tt', 1:5, sep=''), 'pdf')
file_extension(paste('aatt', 1:5, sep=''), 'pdf')
}
|