Installation guide
System Administration
Adding Custom Tests
13-31
Boolean getRegKeyExists(string key, debug=0)
Check to see if a single key exists in the registry. Returns the following:
• 1 if exists
• 0 if it does not exist
Boolean getRegValueDataExpression(string key, string expression,
debug=0)
Check if a value's data matches an expression. Expression is of the format
similar to Perl regular expressions. Returns:
• 1 if match
• 0 if no match
File API
NOTE: Environment variable templates can be used in filenames. For example,
%AppData%\\Adobe.
For performance reasons, it is important to use the same case when specifying the same file name in
multiple calls. Even though the windows file system is not case-sensitive, the test result cache is case-
sensitive.
Int getFileLastModified(string file, debug=0)
Returns: seconds since January 1, 1970
Int getFileCreated(string file, debug=0)
Returns: seconds since January 1, 1970
Boolean getFileExists(string file, debug=0)
Returns the following:
• 1 if true
• 0 if no false
Boolean getFileCanRead(string file, debug=0)
Returns the following:
• 1 if true
• 0 if no false
Boolean getFileCanWrite(string file, debug=0)
Returns the following:
• 1 if true
• 0 if no false
The BasicTests API accesses these functions with the SABase self.bt member. All methods throw an
exception that should be caught if an unexpected error occurs.
Return Value Public Method
Table 13-2.BasicTests API (cont.)