granular_configuration_language .yaml.file_ops.text
- class granular_configuration_language.yaml.file_ops.text.EagerIOTextFile( )[source]
Bases:
objectType: frozen
dataclassAdded in version 2.3.0.
Encapsulates a file that has been read as text.
- granular_configuration_language.yaml.file_ops.text.load_text_file(
- file: Path,
- /,
Added in version 2.3.0.
Load the text file as an
EagerIOTextFileinstance- Parameters:
file (Path) – file path
- Returns:
Constructed instance
- Return type:
- granular_configuration_language.yaml.file_ops.text.read_text_data(
- filename: Path | EagerIOTextFile,
- /,
Added in version 2.3.0.
Read file contents.
Whether it is already loaded (as an
EagerIOTextFileinstance) or as aPath- Parameters:
filename (Path | EagerIOTextFile) – File path
- Raises:
FileNotFoundError – Errors if the file does not exist.
- Returns:
File contents.
- Return type: