listFiles {FastUtils} | R Documentation |
List Only Files in a Directory
Description
This function lists only the files in a specified directory, excluding
directories. It is useful when you need to process or analyze only the files
within a directory without including subdirectories. The base::list.files()
function lists both files and directories, so this function provides a more
convenient way to obtain just the files.
Usage
listFiles(dirPath, ...)
Arguments
dirPath |
Character. The path to the directory from which to list files. |
... |
Additional arguments passed to |
Value
A character vector of file paths.
Examples
listFiles(getwd())
listFiles(getwd(), pattern = "\\.R$", recursive = TRUE)
[Package FastUtils version 0.1.1 Index]