The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33233 ripley 1
\name{normalizePath}
2
\alias{normalizePath}
3
\title{Express File Paths in Canonical Form}
4
\description{
33237 ripley 5
  Convert file paths to canonical form for the platform, to display them
6
  in a user-understandable form.
33233 ripley 7
}
8
\usage{
9
normalizePath(path)
10
}
11
\arguments{
12
  \item{path}{character vector of file paths.}
13
}
14
\details{
33237 ripley 15
#ifdef unix
16
  Where the platform supports it this turns paths into absolute paths
17
  in their canonical form (no \code{./}, \code{../} nor symbolic links).
18
#endif
19
#ifdef windows
33398 ripley 20
  This converts relative paths to absolute paths, and converts short
21
  names to long names.  It will always use backlashes as the path separator.
33237 ripley 22
#endif
23
 
24
  If the path is not a real path the result is undefined but will most
25
  likely be the corresponding input element.
33233 ripley 26
}
27
\value{
28
  A character vector.
29
}
30
\examples{
31
cat(normalizePath(c(R.home(), tempdir())), sep = "\n")
32
}
33
\keyword{ utilities }