2026-08-14 14:25:53 +02:00
|
|
|
namespace AIStudio.Tools.Services;
|
|
|
|
|
|
|
|
|
|
public sealed class FileEnumerationResult
|
|
|
|
|
{
|
|
|
|
|
public List<FileInfo> Files { get; } = [];
|
|
|
|
|
|
|
|
|
|
public List<DataSourceEmbeddingFailure> Failures { get; } = [];
|
|
|
|
|
|
|
|
|
|
public int FailedFiles { get; set; }
|
|
|
|
|
|
|
|
|
|
public string LastError { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public void AddFailure(string filePath, string reason)
|
|
|
|
|
{
|
2026-09-06 15:54:53 +02:00
|
|
|
this.Failures.Add(new DataSourceEmbeddingFailure(filePath, reason, DateTimeOffset.UtcNow));
|
2026-08-14 14:25:53 +02:00
|
|
|
this.FailedFiles = this.Failures.Count;
|
|
|
|
|
this.LastError = reason;
|
|
|
|
|
}
|
2026-09-06 15:54:53 +02:00
|
|
|
}
|