async downloadObjectsInBuffer(onProgress) {
    let first = true
    let downloadNum = 0

    for await (const obj of this.getObjectIterator()) {
      if (first) {
        this.totalChildrenCount = obj.totalChildrenCount
        first = false
        this.isLoading = true
      }
      downloadNum++
      if (onProgress)
        onProgress({
          stage: 'download',
          current: downloadNum,
          total: this.totalChildrenCount
        })
    }
    this.isLoading = false
  }
/**
   * Internal function used to download all the objects in a local buffer.
   * @param {*} onProgress
   */
Internal function used to download all the objects in a local buffer.
@param {*} onProgress
Internal function used to download all the objects in a local buffer . @param { * } onProgress
async downloadObjectsInBuffer(onProgress) {
    let first = true
    let downloadNum = 0
    for await (const obj of this.getObjectIterator()) {
      if (first) {
        this.totalChildrenCount = obj.totalChildrenCount
        first = false
        this.isLoading = true
      }
      downloadNum++
      if (onProgress)
        onProgress({
          stage: 'download',
          current: downloadNum,
          total: this.totalChildrenCount
        })
    }
    this.isLoading = false
  }
async downloadObjectsInBuffer ( onProgress ) { let first = true let downloadNum = 0 for await ( const obj of this . getObjectIterator ( ) ) { if ( first ) { this . totalChildrenCount = obj . totalChildrenCount first = false this . isLoading = true } downloadNum ++ if ( onProgress ) onProgress ( { stage : 'download' , current : downloadNum , total : this . totalChildrenCount } ) } this . isLoading = false }
Internal function used to download all the objects in a local buffer.
Internal function used to download all the objects in a local buffer .