How files are located
Filenames can be supplied to the FOPEN and FEXISTS functions, and optionally an image can be supplied to MESSAGEBOX, MESSAGEBOX_ASYNC and INPUTBOX. The following algorithm is used to locate that file:
- If the project is contained in a XJPack file then:
- Firstly, the XJPack file is searched. If the filename is absolute, it is made relative to the original location of the project on disk, as this is how the filename will have been stored for any file manually added to the XJPack file.
- If the file is not found inside the XJPack file, then it is looked for on disk. If the filename is absolute, then that path is used, otherwise the filename is assumed to be relative to the XJPack file.
- If the project is not inside an XJPack file (e.g. running from XJDeveloper) then the path, if relative, is assumed to be relative to the location of the project file.
Files opened for writing when running from an XJPack file
Files inside the XJPack file cannot be opened for writing; use FERROR after calling FOPEN to check whether it succeeded. If the file does not exist either inside the XJPack file or on disk, then a new file is always created on disk, not inside the XJPack file.
XJTAG v4.2.5
