getAllFileNames method: PrcsAPI class
Syntax
getAllFileNames(PrcsInstance)
Description
Use the getAllFileNames method to return a list of all the files names detected by the scheduler to initiate this process. The names are returned in an array of string, as full path names.
Parameters
| Parameter | Description |
|---|---|
|
PrcsInstance |
Specify the process instance for which you want to get all the associated file names, as a number. |
Returns
An array of string containing all the files names associated with the specified process.
Example
The following example returns a list of file names.
/* QE_OPT_AET is the state record for the application engine program in this⇒
example */
import PT_PRCS:API:*;
Local PrcsApi &api = create PrcsApi();
Local File &FileIO, &FileLog;
Local array of string &strList = &api.getAllFileNames(QE_OPT_AET.PROCESS_⇒
INSTANCE);
/* api call needs process instance as parameter */
/* the api returns list of file names matched by the scheduler for this instance */
For &i = 1 To &strList.Len
&IOFilename = &strList [&i];
&FileIO = GetFile(&IOFilename, "r", "UTF8", %FilePath_Absolute);
&FileIO.Delete();
&FileIO.Close();
End-For;