| yoixPath |
(String path) |
yoix.system |
| |
Converts the supplied
path
into a fully resolved path in Yoix format.
The supplied path need not indicate an existing file or directory.
Fully resolved
means that all relative references and references to the current directory are resolved.
Yoix format
means that the slash character,
/,
is used to delimit path components.
The current directory is resolved to the value of the Java property
user.pwd,
if supplied, or
user.dir,
otherwise.
The
user.pwd
property can be set by using the
-D
option to the Java interpreter when running Yoix.
When supplied,
user.pwd
can refer to a symbolic link, but it
must indicate the same physical location as that indicated by
user.dir
and must contain no relative references otherwise it will be ignored and
the value of
user.dir
will be used in its place.
The current directory is fixed when Yoix is started.
The
path
string may use slashes,
/,
to delimit path components or the platform-dependent component separator
may be used.
On Windows platforms,
the
path
string can represent disk information either by the usual
letter-colon format or using a slash-letter-slash format, familiar to users of
Dave Korn's U/WIN, so that relative references can be used to
change disks.
In either event, the returned string will represent disk information using
the usual letter-colon format.
| |
| Example: |
On a Windows platform with the current directory being
c:\appl,
then the following:
import yoix.system.*;
import yoix.stdio.*;
printf("%20s <==> %s\n", ".", yoixPath("."));
printf("%20s <==> %s\n", "d:\\new_appl", yoixPath("d:\\new_appl"));
printf("%20s <==> %s\n", "/d/new_appl", yoixPath("/d/new_appl"));
printf("%20s <==> %s\n",
"../../d/new_appl", yoixPath("../../d/new_appl"));
printf("%20s <==> %s\n",
"../other_appl/file", yoixPath("../other_appl/file"));
results in:
. <==> c:/appl
d:\new_appl <==> d:/new_appl
/d/new_appl <==> d:/new_appl
../../d/new_appl <==> d:/new_appl
../other_appl/file <==> c:/other_appl/file
| | |
| Return: |
String
| | |
| See Also: |
localPath
realPath
|
|
Yoix is a registered trademark of AT&T Intellectual Property.
|