Skip to contents

This function is a slightly friendlier version of list.files in that it automatically includes the full.names=TRUE argument.

Usage

listFiles(x, ...)

Arguments

x

Path name of folder containing files to list.

...

Arguments to pass to list.files (other than full.names).

Value

Character.

See also

Examples

# list files in location where R is installed
listFiles(R.home())
#>  [1] "/opt/R/4.4.1/lib/R/COPYING"      "/opt/R/4.4.1/lib/R/SVN-REVISION"
#>  [3] "/opt/R/4.4.1/lib/R/bin"          "/opt/R/4.4.1/lib/R/doc"         
#>  [5] "/opt/R/4.4.1/lib/R/etc"          "/opt/R/4.4.1/lib/R/include"     
#>  [7] "/opt/R/4.4.1/lib/R/lib"          "/opt/R/4.4.1/lib/R/library"     
#>  [9] "/opt/R/4.4.1/lib/R/modules"      "/opt/R/4.4.1/lib/R/share"       
#> [11] "/opt/R/4.4.1/lib/R/site-library"
listFiles(R.home(), pattern='README')
#> character(0)