code: public ISO9660Directory relocate() {
          ISO9660Directory movedDirectoriesStore = root.getMovedDirectoriesStore();
          ISO9660Directory oldParent = parent;
          int oldLevel = level;
  
          // Relocate directory (updates level and parent pointer)
          movedDirectoriesStore.addDirectory(this);
  
          // Update level of all subdirectories
          int difference = oldLevel - getLevel();
          Iterator it = unsortedIterator();
          while (it.hasNext()) {
              ISO9660Directory subdir = (ISO9660Directory) it.next();
              subdir.setLevel(subdir.getLevel() - difference);
          }
  
          return oldParent;
      }
docs: Relocate directory
  
  @return Old parent directory