tracts.driver_utils.locate_file_path#
- locate_file_path(filename, script_dir, absolute_driver_yaml_path=None, verbose=False)#
Locates the file path for a given filename by searching in multiple locations. The search order is as follows: 1. Working directory 2. Script directory (if provided) 3. Directory of the driver yaml file (if provided) 4. Directories in sys.path
- Parameters:
(str) (filename)
None) (absolute_driver_yaml_path (str | Path |)
None)
(bool) (verbose)
- Return type:
Optional[Path]- Returns:
Optional[Path]: The path to the located file, or None if the file is not found.