[API Proposal]: Add File.ReadAllLinesAsync methods that return IAsyncEnumerable<string> #60719
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.IO
untriaged
New issue has not been triaged by the area owner
Background and motivation
The existing
File.ReadAllLinesAsync
method returns aTask<string[]>
meaning that the entire contents will have to be loaded in-memory before the task completes. This might be unsuitable in cases where we need to lazily process very large files on a line-by-line basis. It seems likeIAsyncEnumerable<string>
might be the ideal abstraction to achieve this.API Proposal
API Usage
Alternative Designs
Should we consider accepting a custom separator parameter? (instead of
Environment.NewLine
)Risks
No response
The text was updated successfully, but these errors were encountered: