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