Be explicit about how text is read so the script is honest about the boundary and easier to reason about later. File boundaries are a good interview topic because they reveal whether you think beyond the happy path.
The strongest answers connect the feature to reasoning and tradeoffs instead of reciting syntax.
Additional Notes
How should you explain reading text in an interview?