| findPaths |
(Array files, String paths[, int mode]) |
yoix.util |
| findPaths |
(String paths, Array files[, int mode]) |
|
| findPaths |
(String paths, String file[, int mode]) |
|
| |
When supplied both with
paths,
which is a
String
providing a list of directories delimited by the system path separator character, the value of
which can be found as a system property or which is available as a convenience in the
PATHSEP
variable, and with
files,
which is an
Array
of
String
values of possible file names or, alternatively, a single
String-valued
file
name can be supplied, this built-in will construct file path names
from these and will return either an
Array
or a
String,
as determined by the value of
mode
(see below),
of any of the constructed paths that indicated an existing file.
The order for checking existence is as follows:
for each element in the first argument, in the order it appears in
that argument, is combined with each element in the second argument,
in the order it appears in that argument, to create a full file path name,
which is checked to see if the indicated file exists.
The exact set of values returned depends on the value of the
int
supplied via
mode.
If
mode
is less than zero, then only the first file found is returned.
In this case, the return value is a
String.
If
mode
equals zero,
then the first occurrence of each of the file names provided in
files
is returned.
In this case the return value is an
Array
or
String
values.
If
mode
is greater than zero,
then all occurrences of any of the files existing in any of the directories are returned.
In this case the return value is also an
Array
or
String
values.
|
Yoix is a registered trademark of AT&T Inc.
|