findFile
String findFile(where, filename)
This function returns the path of the given filename
or raises a LookupError
exception if the file cannot be found.
If the where
parameter is "scripts"
, findFile
looks for the filename
in the test case scripts
directory. If that doesn't contain the file the function next tries the test suite's shared/scripts
directory. If that doesn't contain the file, the function tries the paths in the paths.ini
initialization file. If it still isn't found, the function tries all of the directories listed in the SQUISH_SCRIPT_DIR
environment variable (if it is defined). As soon as the file is found, the filename path is returned; otherwise a catchable LookupError
exception is raised.
If the where
parameter is "testdata"
, findFile
looks for the filename
in the test case's testdata
directory. If that doesn't contain the file the function next tries the test suite's shared/testdata
directory, and failing that the function tries the test case directory. As soon as the file is found, the filename path is returned; otherwise a catchable LookupError
exception is raised.
(See also, the source(filename) function and the Test Data Functions.)
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.