From 43122435af22b55563c1b2943c9636148c21fe6a Mon Sep 17 00:00:00 2001 From: Alex Chubaty Date: Thu, 16 May 2024 12:56:20 -0600 Subject: [PATCH] minor: add TODO re: file ext funs copied from tools with #389 --- R/helpers.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/helpers.R b/R/helpers.R index dd765e581..e672e3935 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -385,12 +385,13 @@ isMac <- function() { !need } -# This is directly from tools::file_ext_sans_ext +## TODO: why not use the original funs below? why copy them? +## This is directly from tools::file_path_sans_ext filePathSansExt <- function(x) { sub("([^.]+)\\.[[:alnum:]]+$", "\\1", x) } -# This is directly from tools::file_ext +## This is directly from tools::file_ext fileExt <- function(x) { pos <- regexpr("\\.([[:alnum:]]+)$", x) ifelse(pos > -1L, substring(x, pos + 1L), "")