public @Nullable("`null` means an unknown type, typically a broken symlink") Type getType() {
    int type = (flags >> TYPE_SHIFT) & 0b11;
    switch (type) {
      case 0b00: return null;
      case 0b01: return Type.FILE;
      case 0b10: return Type.DIRECTORY;
      case 0b11: return Type.SPECIAL;
    }
    throw new IllegalStateException("Invalid type flags: " + Integer.toBinaryString(flags));
  }
public @Nullable("`null` means an unknown type, typically a broken symlink") Type getType()