Allfiles(); Arraytostring(); Functions In Common_Function.vbs - IBM Prerequisite Scanner User Manual

Table of Contents

Advertisement

allFiles()

Reads the file names in a specified directory into an array.
Purpose
This function gets the list of files in the directory input parameter and adds them
to the array. It returns the array.
Syntax
allFiles(filepath)
Input parameters
String filepath
Return values
Array fileNames

arrayToString()

Creates a string representation for the array.
114
Prerequisite Scanner: User's Guide
Table 32. Functions in common_function.vbs (continued)
Function
"isMatch()" on page 122
"notInLatter()" on page 122
"passOrFail()" on page 123
"ppread()" on page 124
"readFile()" on page 124
"unitMGTOG()" on page 125
"varToString()" on page 125
The path to the directory that contains the files.
Returns the array containing the file names in the specified directory.
Description
Checks whether the search pattern is in the
string.
Filters the first array to determine whether
the content is in the second array.
Depending upon the value of the in_or_not
input parameter, the function returns the
contents of first array including or excluding
what matched with the second array.
Compares the expected and actual values of
the prerequisite property and determines
whether the prerequisite property passes the
check. The input parameters can be generic
numbers, size in MBs or GBs, CPU speed in
MHz or GHz, boolean, or strings.
Reads the contents of a file to a scripting
dictionary object, further splitting each line
in the file by the specified separator input
parameter if that separator exists in the line.
Reads each line of a file into an index entry
of an array.
Adds together the contents of an array to
obtain the total number of MBs.
Creates a string representation of a variable.
The variable to check can be a string,
number, scripting dictionary object, array, or
CheckItem object.

Advertisement

Table of Contents
loading

Table of Contents