file_extension {pkgmaker}R Documentation

Extract File Extension

Description

Extract File Extension

Usage

file_extension(x, ext = NULL)

Arguments

x

path as a character vector.

ext

extension to append instead of the original extension.

Value

a character vector.

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')


[Package pkgmaker version 0.32.10 Index]