public async IAsyncEnumerable GetChildrenAsync()

in Core/src/Impl/Storages/ZipArchiveStorage.cs [189:210]


    public async IAsyncEnumerable<ChildrenItem> GetChildrenAsync(ChildrenMode mode, SymbolStoragePath? prefixDir = null)
    {
      if (!CanRead)
        throw new InvalidOperationException("ZipFileStorage created without Read access");
      
      await Task.Yield();
      using (var archive = await myProvider.RentAsync(writable: false))
      {
        string? prefix = prefixDir != null ? SymbolPathToZipPath(prefixDir.Value) + "/" : null;
        
        foreach (var zipArchiveEntry in archive.Archive.Entries)
        {
          if (prefix != null && !zipArchiveEntry.FullName.StartsWith(prefix))
            continue;
          
          yield return new ChildrenItem(
            ZipPathToSymbolPath(zipArchiveEntry.FullName),
            mode == ChildrenMode.WithSize ? archive.GetEntryLength(zipArchiveEntry) : null
          );
        }
      }
    }