Accessing Files Programmer's Guide (32650-90885)

196 Chapter14
Getting File Information
Retrieving Specific File Information
Here is an example of an FFILEINFO intrinsic call. The information returned in this
example is the same information retrieved in theFINFO example above:
HPFOPEN(FILENUM,STATUS);
FORMALDESIGNATOR:= EMPTYARRAY;
FILECODE:=0;
FOPTIONS:=0;
CREATOR:=EMPTYARRAY;
FFILEINFO(FILENUM,1,FORMALDESIGNATOR,18,CREATOR,2,FOPTIONS,8,FILECODE);
Here is a description of the information returned in the parameters specified in the above
FFILEINFO call:
A complete description of the information that you can obtain using FFILEINFO is given in
the MPE/iX Intrinsics Reference Manual.
FGETINFO
This intrinsic, which returns some of the same information as FFILEINFO, is an MPE
V/E-based intrinsic that is currently supported only for compatibility reasons. When you
use a call to FGETINFO, MPE/iX now calls FFILEINFO to retrieve the file information. For
this reason, it is advisable for you to call FFILEINFO directly; however, there is no need to
rewrite existing programs that use FGETINFO unless there is a performance problem.
Here is an example of an FGETINFO intrinsic call that is the exact equivalent of the
FFILEINFO example shown above:
HPFOPEN(FILENUM,STATUS);
FORMALDESIGNATOR:= EMPTYARRAY;
FILECODE:=0;
FOPTIONS:=0;
CREATOR:=EMPTYARRAY;
FGETINFO(FILENUM,FORMALDESIGNATOR,,FOPTIONS,,,,,FILECODE,,,,,,,,,,CREATOR);
A complete description of the information that you can obtain using FGETINFO is given in
the MPE/iX Intrinsics Reference Manual.
FILENUM A variable of type 16-bit signed integer that returns the file
number of the file about which information is requested.
FORMALDESIGNATOR A variable of type character array that returns the actual file
designator of the file, in the format
filename/groupname/accountname
.
CREATOR A variable of type character array that returns the file creator
name.
FOPTIONS A variable of type 16-bit unsigned integer that returns file
characteristics in the format described in the FOPEN intrinsic
description.
FILECODE A variable of type 16-bit signed integer that returns the file code.