The R Project SVN R

Rev

Rev 85835 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 85835 Rev 85990
Line 68... Line 68...
68
  \code{\link{file_test}} for shell-style file tests.
68
  \code{\link{file_test}} for shell-style file tests.
69
}
69
}
70
 
70
 
71
\examples{
71
\examples{
72
fa <- file.access(dir("."))
72
fa <- file.access(dir("."))
73
## IGNORE_RDIFF_BEGIN
73
\dontdiff{
74
table(fa) # count successes & failures
74
table(fa) # count successes & failures
-
 
75
 
75
#ifdef windows
76
#ifdef windows
76
d <- dir(file.path(R.home(), "bin"))
77
d <- dir(file.path(R.home(), "bin"))
77
df <- dir(file.path(R.home(), "bin"), full.names = TRUE)
78
df <- dir(file.path(R.home(), "bin"), full.names = TRUE)
78
d[file.access(df, 0) == 0] # all exist
79
d[file.access(df, 0) == 0] # all exist
79
d[file.access(df, 1) == 0] # some are executable, some are not
80
d[file.access(df, 1) == 0] # some are executable, some are not
80
d[file.access(df, 4) == 0] # hopefully all are readable
81
d[file.access(df, 4) == 0] # hopefully all are readable
81
d[file.access(df, 2) == 0] # they may or may not be writable
82
d[file.access(df, 2) == 0] # they may or may not be writable
82
#endif
83
#endif
83
## IGNORE_RDIFF_END
84
}
84
}
85
}
85
\keyword{file}
86
\keyword{file}