find_filename#
- caf.toolkit.io.find_filename(path, alt_types=None, return_full_path=True)[source]#
Checks if the file at path exists under a different file extension.
If path ends in a file extension, will try find that file first. If that doesn’t exist, it will look for a compressed, or ‘.csv’ version.
- Parameters:
- Returns:
The path to a matching, or closely matching (differing only on filetype extension) file.
- Return type:
- Raises:
FileNotFoundError: – If the file cannot be found under any of the given alt_types file extensions.