parse.file_ext: Parse a file extension from a relative path

Description Usage Arguments Details Value See Also Examples

Description

parse.file_ext

Usage

1
parse.file_ext(files = NULL, with_paths = FALSE)

Arguments

files

takes a string or list of file names.

with_paths

logical Do the file names contain paths. Relatively useless but kept for backwards compatibility.

Details

Given a file name, path or relative path this will extract the file extensions and parse properly into a data frame object that can then be used as a ref table.

Value

a DataFrame with two columns files and ext for extensions

See Also

Other startup functions: adf, chain.df, dev.opts_in, packs.hush, ul.as

Examples

1
2
3
4
5
6
7
parse.file_ext(c('this.rds','this.min.css','this.html'))
> @format
> A data frame with 3 observations on the following 2 variables.
> \describe{
>   \item{files}{a character vector}\emph{ex:this.rds}
>   \item{ext}{a character vector}\emph{ex:.rds}
> }

Rterial/Rtbase documentation built on May 9, 2019, 10:35 a.m.