lib/EntryIterator.js
function (start, end, force) {
    var bytesRead;

    if (end - start > config.bufferSize) {
      return reject(new Error("Range exceeds the max buffer size"));
    }
    if (force || start < currentRange.start || (start > currentRange.end)) {
      bytesRead = fs.readSync(fd, buffer, 0, config.bufferSize, start);
      currentRange.start = start;
      currentRange.end = start + bytesRead;
      debug("buffering new range: %s", JSON.stringify(currentRange));
    }
  }
function (start, end, force) {
    var bytesRead;

    if (end - start > config.bufferSize) {
      return reject(new Error("Range exceeds the max buffer size"));
    }
    if (force || start < currentRange.start || (start > currentRange.end)) {
      bytesRead = fs.readSync(fd, buffer, 0, config.bufferSize, start);
      currentRange.start = start;
      currentRange.end = start + bytesRead;
      debug("buffering new range: %s", JSON.stringify(currentRange));
    }
  }
function ( start , end , force ) { var bytesRead ; if ( end - start > config . bufferSize ) { return reject ( new Error ( "Range exceeds the max buffer size" ) ) ; } if ( force || start < currentRange . start || ( start > currentRange . end ) ) { bytesRead = fs . readSync ( fd , buffer , 0 , config . bufferSize , start ) ; currentRange . start = start ; currentRange . end = start + bytesRead ; debug ( "buffering new range: %s" , JSON . stringify ( currentRange ) ) ; } }
Synchrounously updates the cache with a new range of data if the required
range is not within the current cache.
@param {Number} start Start position of the required range. Cannot be null.
@param {Number} end End position of the required range. Cannot be null.
@param {Boolean} force Indicates whether to force the cache update.
Synchrounously updates the cache with a new range of data if the required range is not within the current cache .