File Search Procedure
Valid for: CANoe DE • CANoe4SW DE • CANoe:lite DE • CANoe4SW:lite DESingle Host Environment
A file search procedure is used to determine the absolute file path. There are different procedures for writing and reading files.File Search Order on Read Access:
- If the CAPL file function is used in the CANoe DE Family Simulation or Test Setup, look up the filename in the list of predefined user files (Configuration|Options|Extensions|User Files) and take the path specified there.
- If the filename is not found in the list of predefined user files and the CAPL function setFilePath has been called before, use the directory specified with setFilePath as base to determine the absolute path.
- If setFilePath was not called before opening a file for read access, search the file in the directory of the first database.
- If the file could not be found there, the directories of further databases will be used.
- If the file still could not be found, the directory of the configuration file will be used.
File Search Order on Write Access
- If the CAPL file function is used in the CANoe DE Family Simulation or Test setup, look up the filename in the list of predefined user files (Configuration|Options|Extensions|User Files) and take the path specified there.
- If the filename is not found in the list of predefined user files and the CAPL functions setFilePath or setWritePath have been called before, use the directory specified with setFilePath/setWritePath as base to determine the absolute path.
- If setFilePath/setWritePath was not called before opening a file for write access, the configuration directory will be used as base to determine the absolute path instead.