IceGrid.FileIterator¶
- class IceGrid.FileIterator¶
-
Iterates over an IceGrid log file.
Notes
The Slice compiler generated this skeleton class from Slice interface
::IceGrid::FileIterator.- abstractmethod destroy(current: Current) None | Awaitable[None]¶
Destroys the iterator.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- static ice_staticId() str¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
- abstractmethod read(size: int, current: Current) tuple[bool, Sequence[str]] | Awaitable[tuple[bool, Sequence[str]]]¶
Read lines from the log file.
- Parameters:
size (int) – Specifies the maximum number of bytes to be received. The server will ensure that the returned message doesn’t exceed the given size.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
- A tuple containing:
bool
trueif EOF is encountered.Sequence[str] The lines read from the file. If there was nothing to read from the file since the last call to read, an empty sequence is returned. The last line of the sequence is always incomplete (and therefore no newline character should be added when writing the last line to the to the output device).
- Return type:
tuple[bool, Sequence[str]] | Awaitable[tuple[bool, Sequence[str]]]
- Raises:
FileNotAvailableException – Thrown when the implementation failed to read from the file.