Absolute path name for a file.

DESCRIPTION:

Given the name of a file, return an absolute path to it, one that may be used from any directory on this computer.

USAGE:

file.realpath(x, style = c("UNC", "LOCAL"))

REQUIRED ARGUMENTS:

x
The name of a file that exists on this computer. A vector of names may be given.
style
Specifies the style of the full path. Can be a combination of the following: "UNC". The default; If a network drive, this is \\hostname\drive\dir\sub dir\file
"LOCAL". The default. If the path is local, this is drive:\dir\sub dir\file
"SHORTDOS". In Windows, the shortened DOS name. For example, drive:\dir\subdir~1\file

VALUE:

The absolute path to this file. This will start with a drive letter or double backslash (\\) on Windows or a forward slash (/) on Unix and will list all directories between the root of the file system and the file. You can use this path to refer to the file from any directory on this computer.

DETAILS:

On Unix systems with an automounter running, the absolute path may not be useful for very long, as the automounter may unmount the directory.

SEE ALSO:

EXAMPLES:

file.realpath(".")
# [1] /homes/bill