Skip to content

Commit

Permalink
minor: add TODO re: file ext funs copied from tools
Browse files Browse the repository at this point in the history
with #389
  • Loading branch information
achubaty committed May 16, 2024
1 parent cfb4f3c commit 4312243
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -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), "")
Expand Down

0 comments on commit 4312243

Please sign in to comment.