Syntax
string dirname ( string pathname )
Description
dirname returns the directory portion of a pathname. It does not check that the filename or path exist.
Example
print(dirname("/var/adm/pmlog"));
Returns: "/var/adm"
string dirname ( string pathname )
dirname returns the directory portion of a pathname. It does not check that the filename or path exist.
print(dirname("/var/adm/pmlog"));
Returns: "/var/adm"
int feature_enabled (int feature )
feature_enabled checks whether a particular feature is enabled on the policy server. Use this function to detect support for platform-dependant features; currently these comprise FEATURE_LDAP and FEATURE_VAS (defined as integer constants).
Returns true if the feature is enabled, otherwise false.
if (feature_enabled(FEATURE_LDAP)) { if (proc_do_ldap_authentication(user)) { accept; } }
int fileexists ( string path )
int access ( string path )
fileexists or access() determines whether the file fn or path exists on the policy server.
Returns true if the path name exists, false if not.
if (fileexists("/opt/quest/pmc") ) { print ("PMC is installed."); }
if (access("/opt/quest/pmc") ) { print ("PMC is installed."); }
int getopt ( string argv, string optstring))
getopt breaks up command lines for easier parsing and legal review. It examines a list of arguments for short options, which is a dash followed by a single letter or parameter.
while ((option = getopt(args, "vh")) !=""){ print("Matched option",option); }
© 2024 One Identity LLC. ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center