mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-04 08:52:04 +00:00
Improved reading and writing large Office files without copying them into memory (#1243)
This commit is contained in:
1 parent
918572c158
commit
dbe609a9a7
37 files changed
+1161
-471
No files matched your search
@@ -41,16 +41,17 @@ public interface IDocumentSegmentFormat
|
||||
/// Reads the segments of a document, in the order of the document.
|
||||
/// </summary>
|
||||
/// <param name="path">The document.</param>
|
||||
/// <param name="logger">Where the format reports what goes wrong on the way, e.g., a temporary file which cannot be removed.</param>
|
||||
/// <param name="token">Cancels the reading.</param>
|
||||
/// <returns>The segments, including those without letters.</returns>
|
||||
public Task<IReadOnlyList<DocumentSegment>> ReadAsync(string path, CancellationToken token);
|
||||
public Task<IReadOnlyList<DocumentSegment>> ReadAsync(string path, ILogger logger, CancellationToken token);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a copy of a document with the new texts of its segments.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The format reads the source again and writes nothing when the results do not cover one of its
|
||||
/// segments. It writes only into the target, which the user chose, and leaves the source as it is.
|
||||
/// segments, or when the source changes while the format writes. It writes only into the target, which the user chose, and leaves the source as it is.
|
||||
/// </remarks>
|
||||
/// <param name="sourcePath">The document the segments were read from.</param>
|
||||
/// <param name="targetPath">The new document, which the user chose.</param>
|
||||
|
||||
Reference in new issue
Block a user