syntacticRename | R Documentation |
Rename files and/or directories using a syntactic naming function
syntacticRename(
path,
recursive = FALSE,
fun = c("kebabCase", "snakeCase", "camelCase", "upperCamelCase"),
quiet = FALSE,
dryRun = FALSE
)
path |
|
recursive |
|
fun |
|
quiet |
|
dryRun |
|
Intelligently deals with a case-insensitive file system, if necessary. This is very useful for macOS and Windows.
Our syntactic naming functions can result in changes that only differ in case, which are problematic on case-insensitive mounts, and require movement of the files into a temporary file name before the final rename.
list
.
Named list containining from
and to
rename operations.
Updated 2023-02-06.
testdir <- AcidBase::tempdir2()
from <- file.path(testdir, c("helloWorld.txt", "fooBar.R"))
file.create(from)
print(basename(from))
output <- syntacticRename(from)
print(output)
AcidBase::unlink2(testdir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.