code: @Nullable
    private DirectoryEntry getRealEntry(DirectoryEntry entry) {
      Name name = entry.name();
  
      if (name.equals(Name.SELF) || name.equals(Name.PARENT)) {
        Directory dir = toDirectory(entry.file());
        assert dir != null;
        return dir.entryInParent();
      } else {
        return entry;
      }
    }
docs: Returns the entry for the file in its parent directory. This will be the given entry unless the
  name for the entry is "." or "..", in which the directory linking to the file is not the file's
  parent directory. In that case, we know the file must be a directory ("." and ".." can only
  link to directories), so we can just get the entry in the directory's parent directory that
  links to it. So, for example, if we have a directory "foo" that contains a directory "bar" and
  we find an entry [bar -> "." -> bar], we instead return the entry for bar in its parent, [foo
  -> "bar" -> bar].