download(url, force = false) {
    let promise;
    if (this.cache.has(url)) {
      promise = this.cache.get(url);
    } else {
      const parsedUri = parseUrl(url);
      const ext = parsedUri.ext;
      const isZip = ext.toLowerCase() === ".zip";
      const loc = isZip ? parsedUri.name : join(parsedUri.name, parsedUri.base);
      const dest = join(this.saveLocation, loc);
      // if the file/folder already exists don't download it again unless we are `force`d to
      const exists = existsSync(dest);
      let pendingMove;
      if (exists) {
        if (!force) {
          return Promise.resolve(dest);
        } else {
          pendingMove = moveRemove(dest, ext);
        }
      } else {
        pendingMove = Promise.resolve();
      }

      promise = new Promise((resolve, reject) => {
        const fn = isZip ? this.unzip : this.save;
        get(url, response => {
          if (response.statusCode !== 200) {
            return reject("Response status was " + response.statusCode);
          }
  
          const tmpDest = dest + ".downloading";
          // if there is already a `.downloading` file, we need to get rid of it first
          moveRemove(tmpDest, ext)
            // save our stream as .downloading
            .then(() => fn(response, tmpDest))
            // then move it to its final destination when completely downloaded
            .then(() => pendingMove.then(() => move(tmpDest, dest)))
            .then(() => resolve(dest))
            .catch(reject);
        }).on("error", err => {
          // if anything failed along the way, delete it all
          remove(dest, noop);
          reject(err);
        });
      });
      promise.finally(() => this.cache.delete(url));
      this.cache.set(url, promise);
    }

    return promise;
  }
Downloads the resource to the saveLocation, using the file
@param {string} url The URL of the resource to download