docs: function resolveOwnership (uid: number, gid: number, stat: Stat): number {
    if (uid === stat.uid) {
      return (stat.mode & constants.S_IRWXU) >> 6;
    } else if (gid === stat.gid) {
      return (stat.mode & constants.S_IRWXG) >> 3;
    } else {
      return stat.mode & constants.S_IRWXO;
    }
  }