This method returns the absolute path to a file in the data files section of a load-test script. As there are different locations for the data files depending on where the load-test is executed (localhost or agent) this function always returns the absolute path to a data file.
Kernel.bdh
GetDataFilePath( in sDataFile : string, out sPath : string, in nSize : number optional ): boolean;
true if successfully
false otherwise
Parameter | Description |
---|---|
sDataFile | Name of the data file of which the absolute path should be returned. |
sPath | String buffer that will receive the absolute path of the file. |
nSize | Size of the string buffer passed in sPath (optional). |
dcltrans transaction TMain var sPath : string; hFile : number; begin GetDataFilePath("testdata.txt", sPath); FileCSVLoad(hFile, sPath, ","); ... end TMain;