filename_extract_extension: extract the trailing file extension from a file or path

View source: R/util_files.R

filename_extract_extensionR Documentation

extract the trailing file extension from a file or path

Description

purposely naive approach to keep things simple for our internal usecases; strip a . followed by 1-5 characters from end of the string

Usage

filename_extract_extension(f)

Arguments

f

f can either be a filename or a full path, and optionally carry a file extension. eg; remove_file_extension_from_path("file.txt"); remove_file_extension_from_path("C:/temp/file")

Value

extension including the '.' or empty string if not found


ftwkoopmans/msdap documentation built on March 5, 2025, 12:15 a.m.