original_string: private function removeEmptyDirectories($pathname, $root)
      {
          if (is_dir($pathname)
              && $pathname !== $root
              && $this->filesystem->isDirEmpty($pathname)
          ) {
              $this->filesystem->removeDirectory($pathname);
  
              if (!$this->removeEmptyDirectories(dirname($pathname), $root)) {
                  if ($this->io->isVeryVerbose()) {
                      $this->io->writeError(sprintf('  - Removing empty directory "%s"', $pathname));
                  }
              }
  
              return true;
          }
  
          return false;
      }
code: private function removeEmptyDirectories($pathname, $root)
      {
          if (is_dir($pathname)
              && $pathname !== $root
              && $this->filesystem->isDirEmpty($pathname)
          ) {
              $this->filesystem->removeDirectory($pathname);
  
              if (!$this->removeEmptyDirectories(dirname($pathname), $root)) {
                  if ($this->io->isVeryVerbose()) {
                      $this->io->writeError(sprintf('  - Removing empty directory "%s"', $pathname));
                  }
              }
  
              return true;
          }
  
          return false;
      }
code_tokens: private function removeEmptyDirectories ( $ pathname , $ root ) { if ( is_dir ( $ pathname ) && $ pathname !== $ root && $ this -> filesystem -> isDirEmpty ( $ pathname ) ) { $ this -> filesystem -> removeDirectory ( $ pathname ) ; if ( ! $ this -> removeEmptyDirectories ( dirname ( $ pathname ) , $ root ) ) { if ( $ this -> io -> isVeryVerbose ( ) ) { $ this -> io -> writeError ( sprintf ( '  - Removing empty directory "%s"' , $ pathname ) ) ; } } return true ; } return false ; }
docstring: Clean up empty directories.
  
  @param string $pathname The path to remove if empty.
  @param string $root     The path of the root installation.
  
  @return bool
docstring_tokens: Clean up empty directories .