file.path
Construct Path to File
Description
From the given path components (directories/folders and basenames of files),
construct the path to a file or a directory.
Usage
file.path(..., fsep = .Platform$file.sep)
Arguments
... |
the character strings containing the path components for creating the path names for some files
or directories. Wild card characters and tildes are not treated specially.
If any of the ... entries have a length of zero then the output
will have a length of zero.
|
fsep |
the character string containing the path separator to use in
generating the file path. The default value is the correct separator
for the current platform.
|
Details
See system.file to find files in packages.
See R.home to find files relative the
installation directory.
Value
a vector of character strings with the ... arguments
concatenated in the given order and separated by the fsep string.
file.path returns an empty character vector if no ...
arguments are supplied or if any of them have length zero.
file.path does not check that the returned file paths refer to actual files.
See Also
Examples
# list the contents of the 'library' directory
list.files(file.path(R.home(), "library"))