Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-209
FILENAME_TO_PATHNAME_ Procedure
•
If the file name contains a node name, it must be that of the node on which the
procedure is called.
•
Periods (.) in the Guardian file name are replaced by slashes in the pathname.
•
Alphabetic characters in the pathname are all lower case except for the “G” in
“/G.”
•
If the supplied Guardian file name is the Guardian file name of an OSS file,
pathname returns the corresponding absolute pathname of the OSS file.
•
Some OSS files can have multiple pathnames because additional directory entries
(or links) can be created for existing files. The pathname returned is the first one
found for which the caller has search access unless the
index parameter is used.
If
index is used, all the file names can be returned by making multiple calls to
FILENAME_TO_PATHNAME_ and using the value returned in
index from each
call as the value supplied in
index for the next call. All pathnames have been
returned when the returned value of
index is -1.
•
An error is returned (EINVAL) if index does not correspond to a pathname of the
file; for example, as a result of unlinking a pathname between iterations of the
FILENAME_TO_PATHNAME_ procedure. This error condition also indicates that
there are no further pathnames to this file because index values are always
contiguous.
•
Two additional file numbers might be allocated: one for the OSS root directory and
one for the OSS current working directory. These files are not necessarily the next
available file numbers and they cannot be closed by calling FILE_CLOSE_.
•
A current working directory is established from the value of the VOLUME attribute
of the =_DEFAULTS DEFINE.
•
The resident memory used by the calling process increases by a small amount.
•
If the resulting pathname represents a file in the Guardian name space (/G), then
the system does not check whether such a file exists.
Example in C
ret = FILENAME_TO_PATHNAME_(argv[1], /* Guardian file name */
(short)strlen(argv[1]), /* length of file name */
pathname, /* buffer for OSS path
name */
PATH_MAX, /* length of buffer */
&pathlen, /* length of path name */
, );
Related Programming Manual
For programming information about the FILENAME_TO_PATHNAME_ procedure, refer
to the
Open System Services Programmer’s Guide.