_normalizeEntryData(data, stats) {
    data = {
      type: "file",
      name: null,
      date: null,
      mode: null,
      prefix: null,
      sourcePath: null,
      stats: false,
      ...data,
    };
    if (stats && data.stats === false) {
      data.stats = stats;
    }
    let isDir = data.type === "directory";
    if (data.name) {
      if (typeof data.prefix === "string" && "" !== data.prefix) {
        data.name = data.prefix + "/" + data.name;
        data.prefix = null;
      }
      data.name = sanitizePath(data.name);
      if (data.type !== "symlink" && data.name.slice(-1) === "/") {
        isDir = true;
        data.type = "directory";
      } else if (isDir) {
        data.name += "/";
      }
    }
    // 511 === 0777; 493 === 0755; 438 === 0666; 420 === 0644
    if (typeof data.mode === "number") {
      if (win32) {
        data.mode &= 511;
      } else {
        data.mode &= 4095;
      }
    } else if (data.stats && data.mode === null) {
      if (win32) {
        data.mode = data.stats.mode & 511;
      } else {
        data.mode = data.stats.mode & 4095;
      }
      // stat isn't reliable on windows; force 0755 for dir
      if (win32 && isDir) {
        data.mode = 493;
      }
    } else if (data.mode === null) {
      data.mode = isDir ? 493 : 420;
    }
    if (data.stats && data.date === null) {
      data.date = data.stats.mtime;
    } else {
      data.date = dateify(data.date);
    }
    return data;
  }
Normalizes entry data with fallbacks for key properties.

@private
@param  {Object} data
@param  {fs.Stats} stats
@return {Object}