deepfold.utils.file_utils.get_file_content_and_extension¶
- deepfold.utils.file_utils.get_file_content_and_extension(file_path: PathLike) Tuple[str, str][source]¶
Reads the content of a text file or compressed text file and returns its content along with the real extension (excluding compression extensions like .gz).
- Parameters:
file_path (str) – Path to the text file or compressed text file.
- Returns:
A tuple containing the file content (str) and the real extension (str).
- Return type:
tuple