openResource
function openResource(name: string):resource;
The function opens the resource file located within the application's JAR file. To add the resource file into the JAR file, select the Project->Insert resource menu.
var res : resource;
byte : integer;
line : string;
index : integer;
begin
res := openResource('/data.txt');
if (resourceAvailable(res)) then
begin
byte := readByte(res);
line := readLine(res);
closeResource(res);
end;
showForm;
index := formAddString('Byte is: ' + chr(byte));
index := formAddString('Line is: ' + line);
delay(1000);
end.
See also: resourceAvailable, closeResource, readByte, readLine