in Core/src/Impl/Storages/ZipArchiveStorage.cs [132:149]
public async Task<TResult> OpenForReadingAsync<TResult>(SymbolStoragePath file, Func<Stream, Task<TResult>> func)
{
if (!CanRead)
throw new InvalidOperationException("ZipFileStorage created without Read access");
await Task.Yield();
using (var archive = await myProvider.RentAsync(writable: false))
{
var entry = archive.Archive.GetEntry(SymbolPathToZipPath(file));
if (entry == null)
throw new KeyNotFoundException($"Specified file ({file}) was not found in zip storage");
await using (var srcStream = entry.Open())
{
return await func(srcStream);
}
}
}