Syntax: FILE IOPE dir (int) filename (string)
You should close the input stream with FILE ICLO after you are done reading from it.
If filename is not present, the command will succeed but the input stream will be bad immediately. Likewise if you attempt to traverse above the journal directory. Use INOK to check.
Consider FILE GLOB if you don't know the precise name of the file you need.
Is the world docked? Uses INNL.
FILE IOPE 0 "wtype" DOIF INOK eq 0 DBG: OUTS "huh?" FILE ICLO STOP ELIF INNL eq "docked" OUTS "yes" ELSE OUTS "no" ENDI FILE ICLO
Perhaps we need a good enough version of the engine, let's say 190 or above, otherwise we can't run. Uses INNI.
FILE IOPE 0 "build" DOIF INOK eq 0 or INNI lt 190 DBG: OUTS "uh oh!" FILE ICLO STOP ENDI