_updateQueueTaskWithStats(task, stats) {
    if (stats.isFile()) {
      task.data.type = "file";
      task.data.sourceType = "stream";
      task.source = new Readable(function () {
        return createReadStream(task.filepath);
      });
    } else if (stats.isDirectory() && this._supportsDirectory) {
      task.data.name = trailingSlashIt(task.data.name);
      task.data.type = "directory";
      task.data.sourcePath = trailingSlashIt(task.filepath);
      task.data.sourceType = "buffer";
      task.source = Buffer.concat([]);
    } else if (stats.isSymbolicLink() && this._supportsSymlink) {
      const linkPath = readlinkSync(task.filepath);
      const dirName = dirname(task.filepath);
      task.data.type = "symlink";
      task.data.linkname = relativePath(
        dirName,
        resolvePath(dirName, linkPath),
      );
      task.data.sourceType = "buffer";
      task.source = Buffer.concat([]);
    } else {
      if (stats.isDirectory()) {
        this.emit(
          "warning",
          new ArchiverError("DIRECTORYNOTSUPPORTED", task.data),
        );
      } else if (stats.isSymbolicLink()) {
        this.emit(
          "warning",
          new ArchiverError("SYMLINKNOTSUPPORTED", task.data),
        );
      } else {
        this.emit("warning", new ArchiverError("ENTRYNOTSUPPORTED", task.data));
      }
      return null;
    }
    task.data = this._normalizeEntryData(task.data, stats);
    return task;
  }
Updates and normalizes a queue task using stats data.

@private
@param  {Object} task
@param  {Stats} stats
@return {Object}