The R Project SVN R

Rev

Rev 59039 | Rev 71883 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 61433
Line 18... Line 18...
18
\description{
18
\description{
19
  \code{unlink} deletes the file(s) or directories specified by \code{x}.
19
  \code{unlink} deletes the file(s) or directories specified by \code{x}.
20
}
20
}
21
\details{
21
\details{
22
  Tilde-expansion (see \code{\link{path.expand}}) is done on \code{x}.
22
  Tilde-expansion (see \code{\link{path.expand}}) is done on \code{x}.
23
  
23
 
24
  If \code{recursive = FALSE} directories are not deleted,
24
  If \code{recursive = FALSE} directories are not deleted,
25
  not even empty ones.
25
  not even empty ones.
26
 
26
 
27
#ifdef unix
27
#ifdef unix
28
  On most platforms \sQuote{file} includes symbolic links, fifos and
28
  On most platforms \sQuote{file} includes symbolic links, fifos and
29
  sockets.  Prior to \R 2.15.0 \code{unlink(x, recursive = TRUE)} would
29
  sockets.  Prior to \R 2.15.0 \code{unlink(x, recursive = TRUE)} would
30
  delete the contents of a directory target of a symbolic link: it now
30
  delete the contents of a directory target of a symbolic link: it now
31
  only deletes the symbolic link (as \code{unlink(x, recursive = FALSE)}
31
  only deletes the symbolic link (as \code{unlink(x, recursive = FALSE)}
32
  always has).
32
  always has).
33
  
33
 
34
#endif  
34
#endif
35
  Wildcard expansion is done by the internal code of
35
  Wildcard expansion is done by the internal code of
36
  \code{\link{Sys.glob}}.  Wildcards never match a leading \file{.} in
36
  \code{\link{Sys.glob}}.  Wildcards never match a leading \file{.} in
37
  the filename, and files \file{.} and \file{..} will never be
37
  the filename, and files \file{.} and \file{..} will never be
38
  considered for deletion.
38
  considered for deletion.
39
#ifdef unix
39
#ifdef unix
Line 58... Line 58...
58
  \code{\link{file.remove}}).  If a wildcard matches
58
  \code{\link{file.remove}}).  If a wildcard matches
59
  nothing it is considered as a literal character.
59
  nothing it is considered as a literal character.
60
 
60
 
61
  Windows cannot remove the current working directory, nor any file
61
  Windows cannot remove the current working directory, nor any file
62
  which is open nor any directory containing such a file.
62
  which is open nor any directory containing such a file.
63
  
63
 
64
  UTF-8-encoded paths not valid in the current locale can be used.
64
  UTF-8-encoded paths not valid in the current locale can be used.
65
#endif
65
#endif
66
}
66
}
67
\value{
67
\value{
68
  \code{0} for success, \code{1} for failure, invisibly.
68
  \code{0} for success, \code{1} for failure, invisibly.