| Line 14... |
Line 14... |
| 14 |
\usage{
|
14 |
\usage{
|
| 15 |
file_test(op, x, y)
|
15 |
file_test(op, x, y)
|
| 16 |
}
|
16 |
}
|
| 17 |
\arguments{
|
17 |
\arguments{
|
| 18 |
\item{op}{a character string specifying the test to be performed.
|
18 |
\item{op}{a character string specifying the test to be performed.
|
| 19 |
Unary tests (only \code{x} is used) are \code{"-f"} (existence and
|
19 |
Unary tests (only \code{x} is used) are
|
| - |
|
20 |
\code{"-f"} (existence and not being a directory),
|
| 20 |
not being a directory), \code{"-d"} (existence and directory) and
|
21 |
\code{"-d"} (existence and directory),
|
| - |
|
22 |
\code{"-L"} or \code{"-h"} (existence and symbolic link),
|
| 21 |
\code{"-x"} (executable as a file or searchable as a directory).
|
23 |
\code{"-x"} (executable as a file or searchable as a directory),
|
| - |
|
24 |
\code{"-w"} (writable) and
|
| - |
|
25 |
\code{"-r"} (readable).
|
| - |
|
26 |
Binary tests are
|
| 22 |
Binary tests are \code{"-nt"} (strictly newer than, using the modification
|
27 |
\code{"-nt"} (strictly newer than, using the modification dates) and
|
| 23 |
dates) and \code{"-ot"} (strictly older than): in both cases the
|
28 |
\code{"-ot"} (strictly older than):
|
| 24 |
test is false unless both files exist.}
|
29 |
in both cases the test is false unless both files exist.}
|
| 25 |
\item{x, y}{character vectors giving file paths.}
|
30 |
\item{x, y}{character vectors giving file paths.}
|
| 26 |
}
|
31 |
}
|
| 27 |
\details{
|
32 |
\details{
|
| 28 |
\sQuote{Existence} here means being on the file system and accessible
|
33 |
\sQuote{Existence} here means being on the file system and accessible
|
| 29 |
by the \code{stat} system call (or a 64-bit extension) -- on a
|
34 |
by the \code{stat} system call (or a 64-bit extension) -- on a
|