Verifies that files and directories exist, and whether files can be opened. Used at the start of a script to verify inputs.
Key | Value(s) | Description |
---|---|---|
method | "PreFlightCheck" | Tests to see whether specified files and directories exist and can be opened/accessed |
project | "projectname" | Current Project name |
filesExist[] | [ "file1", "file2" ] | Optional. If any file in the list does not exist, method will fail |
directoriesExist[] | [ "directory1", "directory2" ] | Optional. If any directory in the list does not exist, method will fail |
filesOpenable[] | [ "file1", "file2" ] | Optional. If any file in the list cannot be opened, method will fail. |
allowEmptyFiles | true/false | Optional. Default = false. If true, an empty file will not cause the method to raise an error |
{
"method": "PreFlightCheck",
"directoriesExist": [
"%DATAPATH%RegressionTest/SalesDirectory"
],
"filesExist": [
"%DATAPATH%RegressionTest/d3-product.dat",
"%DATAPATH%RegressionTest/d3-customer.dat"
],
"filesOpenable": [
"%DATAPATH%RegressionTest/FieldPropertiesWorkbook.xlsx"
],
"project": "RegressionDB"
}