code: func New(ctx context.Context, c *isolatedclient.Client, hash isolated.HexDigest,
  	outputDir string, options *Options) *Downloader {
  
  	var opt Options
  	if options != nil {
  		opt = *options
  	}
  	if opt.MaxConcurrentJobs == 0 {
  		opt.MaxConcurrentJobs = 8
  	}
  	if opt.MaxFileStatsInterval == 0 {
  		opt.MaxFileStatsInterval = time.Second * 5
  	}
  
  	interval := 100 * time.Millisecond
  	if interval > opt.MaxFileStatsInterval {
  		interval = opt.MaxFileStatsInterval
  	}
  
  	ctx2, cancel := context.WithCancel(ctx)
  	ret := &Downloader{
  		ctx:       ctx2,
  		cancel:    cancel,
  		c:         c,
  		options:   opt,
  		interval:  interval,
  		dirCache:  stringset.New(0),
  		rootHash:  hash,
  		outputDir: normalizePathSeparator(outputDir),
  		isoMap:    map[isolated.HexDigest]*isolated.Isolated{},
  	}
  	return ret
  }
docs: // New returns a Downloader instance, good to download one isolated.
  //
  // ctx will be used for logging and clock.
  //
  // The Client, hash and outputDir must be specified.
  //
  // If options is nil, this will use defaults as described in the Options struct.