Returns the path to the specified parameter file.
String_Type paccess( String_Type paramfile )
String_Type paccess( String_Type paramfile, String_Type mode )
or
Int_Type paccess( Param_File_Type pfile, String_Type param )
String_Type paramgetpath( String_Type paramfile )
String_Type paramgetpath( Param_File_Type pfile )
The paccess() and paramgetpath() routines are used to find out whether parameters and parameter files are accessible.
There are two forms of the paccess() call:
- first argument is a string
- first argument is a Param_File_Type variable
If given a string as the first argument then paccess() will return the full path to the parameter file, or NULL if it can not be found or the parameter file can not be accessed using the supplied mode (the optional second argument). If NULL is returned then the PF_Errno variable will be set to a non-zero value (see "ahelp paramio" for more information on this variable).
If given a Param_File_Type variable as the first argument then paccess() returns 1 if the second argument is listed in the parameter file, or 0 if not.
The paramgetpath() function returns the location of
the parameter file for the given argument, which can be either the name of the parameter file or the Param_File_Type variable returned by paramopen(). If no parameter file can be found then NULL is returned and the PF_Errno variable will be set to a non-zero value (see "ahelp paramio" for a list of the values this variable can take).
chips> require("paramio")
chips> paccess("dmlist")
/home/ciaouser/cxcds_param/dmlist.par
chips> fp = paramopen("dmlist")
chips> paramgetpath(fp)
/home/ciaouser/cxcds_param/dmlist.par
chips> fp = paramopen( "dmcopy" )
chips> paccess( fp, "infile" )
1
chips> paccess( fp, "value" )
0
The paccess() function now has two modes of operation. When called with a String_Type variable as its first argument it behaves as it did prior to CIAO 3.2, and returns the full path to the parameter file. The new mode is enabled when the first argument is a Param_File_Type variable, in which case the function returns 1 if the second argument is the name of a variable defined in the parameter file, or 0 otherwise.
- concept
-
parameter
- modules
-
paramio
- paramio
-
paramclose,
paramopen,
pget,
pgets,
plist_names,
pquery,
pset,
punlearn
- tools
-
dmhistory,
dmkeypar,
dmmakepar,
dmreadpar,
paccess,
pdump,
pget,
pline,
plist,
pquery,
pset,
punlearn
|